Skip to content
Snippets Groups Projects
Commit 60ca4ecd authored by Marco Biasini's avatar Marco Biasini
Browse files

fix segfault when launching DNG on Mountain Lion

parent e67b80c7
Branches
Tags 1.2.0
No related merge requests found
...@@ -208,7 +208,7 @@ void prepare_scripts(int argc, char** argv, PythonInterpreter& py) ...@@ -208,7 +208,7 @@ void prepare_scripts(int argc, char** argv, PythonInterpreter& py)
class MyApplication : public QApplication class MyApplication : public QApplication
{ {
public: public:
MyApplication(int argc, char** argv) : QApplication(argc, argv) {} MyApplication(int& argc, char** argv) : QApplication(argc, argv) {}
virtual ~MyApplication() {} virtual ~MyApplication() {}
virtual bool notify(QObject *rec, QEvent *ev) virtual bool notify(QObject *rec, QEvent *ev)
{ {
...@@ -232,11 +232,13 @@ public: ...@@ -232,11 +232,13 @@ public:
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
int dummy_argc=1; int dummy_argc=1;
char *dummy_argv[]= {argv[0], NULL };
MyApplication app(dummy_argc,argv); std::cout << dummy_argv[0] << std::endl;
MyApplication app(dummy_argc, dummy_argv);
QCoreApplication::setOrganizationName("OpenStructure"); QCoreApplication::setOrganizationName("OpenStructure");
QCoreApplication::setOrganizationDomain("openstructure.org"); QCoreApplication::setOrganizationDomain("openstructure.org");
QCoreApplication::setApplicationName(QString(argv[2])); QCoreApplication::setApplicationName(QString(argv[2]));
if (int rv=setup_resources(app)<0) { if (int rv=setup_resources(app)<0) {
return rv; return rv;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment