From: Mikko Rasa Date: Mon, 23 May 2011 18:28:25 +0000 (+0300) Subject: Prevent a crash if application destructor throws X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5ad225535ae12d53fd79c8f9fa764bd586211b8f;p=libs%2Fcore.git Prevent a crash if application destructor throws --- diff --git a/source/core/application.cpp b/source/core/application.cpp index a588e9d..badc523 100644 --- a/source/core/application.cpp +++ b/source/core/application.cpp @@ -61,7 +61,9 @@ int Application::run(int argc, char **argv, void *data) } int result=app_->main(); - delete app_; + Application *a=app_; + app_=0; + delete a; return result; } catch(const exception &e)