]> git.siccegge.de Git - frida/frida.git/blobdiff - src/gui/Mainwindow.cxx
Handle cancel on InterpreterMenu
[frida/frida.git] / src / gui / Mainwindow.cxx
index 7ea9012bf9ed8fe45e3dd4578234d59160d48237..544d5fd7dc65efee0af1d8d5f7ab194b1a93b291 100644 (file)
@@ -58,9 +58,11 @@ Mainwindow::Mainwindow(InformationManager* mgr)
                        QString fileName = QFileDialog::getOpenFileName(this, tr("Open Script"), "",
                                                                        tr("Binaries") + " (*." +
                                                                        manager->getInterpreter("GUILE")->fileExtension().c_str() + ")");
                        QString fileName = QFileDialog::getOpenFileName(this, tr("Open Script"), "",
                                                                        tr("Binaries") + " (*." +
                                                                        manager->getInterpreter("GUILE")->fileExtension().c_str() + ")");
-                       std::stringstream a, b;
-                       std::string c;
-                       manager->getInterpreter("GUILE")->loadFile(fileName.toStdString(), a, b, c);
+                       if(! fileName.isNull()) {
+                               std::stringstream a, b;
+                               std::string c;
+                               manager->getInterpreter("GUILE")->loadFile(fileName.toStdString(), a, b, c);
+                       }
                });
 
        listWidget = new QTreeWidget();
                });
 
        listWidget = new QTreeWidget();