X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fgui%2FMainwindow.cxx;h=39fc83e0d83b4506ccc8d4e56ef5ca5ec138d2af;hp=7ea9012bf9ed8fe45e3dd4578234d59160d48237;hb=af104b02984cca1973051b301c946d5937b9af4d;hpb=77a6f2a3b9389e806cff6777098cf901bef4bf46 diff --git a/src/gui/Mainwindow.cxx b/src/gui/Mainwindow.cxx index 7ea9012..39fc83e 100644 --- a/src/gui/Mainwindow.cxx +++ b/src/gui/Mainwindow.cxx @@ -56,11 +56,13 @@ Mainwindow::Mainwindow(InformationManager* mgr) connect(guileLoad, &QAction::triggered, [&]() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open Script"), "", - tr("Binaries") + " (*." + + tr("Scripts") + " (*." + 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();