From f3bd8baa4adaba3d4d5aad0893f78cc7ac6b2b76 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 6 Jul 2019 09:59:42 -0700 Subject: [PATCH] Fix crash in RackWidget::pastePresetClipboardAction(). --- src/app/RackWidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/RackWidget.cpp b/src/app/RackWidget.cpp index 3f01529d..035d8fd2 100644 --- a/src/app/RackWidget.cpp +++ b/src/app/RackWidget.cpp @@ -293,6 +293,10 @@ void RackWidget::pastePresetClipboardAction() { if (moduleJ) { ModuleWidget *mw = moduleFromJson(moduleJ); json_decref(moduleJ); + + // Reset ID so the Engine automatically assigns a new one + mw->module->id = -1; + addModuleAtMouse(mw); // history::ModuleAdd