From 9f0f013a7e5b5bdac9f8e5b12aa8c47d34055187 Mon Sep 17 00:00:00 2001 From: Michael Carpenter Date: Wed, 8 Jan 2014 23:21:35 -0500 Subject: [PATCH] Fix for crash, from double calling of destructor when MainWindow went out of scope --- core/src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main.cpp b/core/src/main.cpp index f203ed7..c734112 100644 --- a/core/src/main.cpp +++ b/core/src/main.cpp @@ -142,10 +142,10 @@ int main(int argc, char *argv[]) } } - MainWindow w; + MainWindow *w = new MainWindow(); if (port != "") { - w.setDevice(port); + w->setDevice(port); } if (plugin == "") { @@ -179,11 +179,11 @@ int main(int argc, char *argv[]) plugin = "/usr/share/emstudio/plugins/libfreeemsplugin.dylib"; } } - w.setPlugin(plugin); + w->setPlugin(plugin); if (autoconnect) { - w.connectToEms(); + w->connectToEms(); } - w.show(); + w->show(); return a.exec(); }