Update of /cvsroot/mahogany/M/src/classes
In directory usw-pr-cvs1:/tmp/cvs-serv16635/src/classes
Modified Files:
MApplication.cpp
Log Message:
don't crash when the application failed to start up (e.g. because incorrect cmd line
options were specified
Index: MApplication.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MApplication.cpp,v
retrieving revision 1.247
retrieving revision 1.248
diff -b -u -2 -r1.247 -r1.248
--- MApplication.cpp 13 Apr 2002 23:34:31 -0000 1.247
+++ MApplication.cpp 14 Apr 2002 09:32:35 -0000 1.248
@@ -627,4 +627,6 @@
}
+ if ( m_profile )
+ {
// The following little hack allows us to decref and delete the
// global profile without triggering an assert, as this is not
@@ -633,4 +635,5 @@
m_profile = NULL;
p->DecRef();
+ }
if ( initialized )
@@ -660,4 +663,12 @@
FreePythonDll();
#endif // USE_PYTHON_DYNAMIC
+ }
+
+ // normally this is done in OnStartup() but if we hadn't done it there
+ // (because the app couldn't start up) do it now
+ if ( m_cmdLineOptions )
+ {
+ delete m_cmdLineOptions;
+ m_cmdLineOptions = NULL;
}
}
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates