diff --git a/plugin.mk b/plugin.mk index 7896ad22..7fdda480 100644 --- a/plugin.mk +++ b/plugin.mk @@ -25,8 +25,6 @@ ifeq ($(ARCH), win) TARGET = plugin.dll endif -DISTRIBUTABLES += $(TARGET) - all: $(TARGET) @@ -38,7 +36,12 @@ clean: dist: all rm -rf dist mkdir -p dist/$(SLUG) + # Strip and copy plugin binary + cp $(TARGET) dist/$(SLUG)/ + strip -s dist/$(SLUG)/$(TARGET) + # Copy distributables cp -R $(DISTRIBUTABLES) dist/$(SLUG)/ + # Create ZIP package cd dist && zip -5 -r $(SLUG)-$(VERSION)-$(ARCH).zip $(SLUG) .PHONY: clean dist \ No newline at end of file diff --git a/src/app/ModuleBrowser.cpp b/src/app/ModuleBrowser.cpp index 374e6e8b..7f71a8da 100644 --- a/src/app/ModuleBrowser.cpp +++ b/src/app/ModuleBrowser.cpp @@ -164,6 +164,8 @@ struct ModelItem : BrowserListItem { void onAction(EventAction &e) override { ModuleWidget *moduleWidget = model->createModuleWidget(); + if (!moduleWidget) + return; gRackWidget->moduleContainer->addChild(moduleWidget); // Move module nearest to the mouse position moduleWidget->box.pos = gRackWidget->lastMousePos.minus(moduleWidget->box.size.div(2));