From 5ad225535ae12d53fd79c8f9fa764bd586211b8f Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 23 May 2011 21:28:25 +0300 Subject: [PATCH] Prevent a crash if application destructor throws --- source/core/application.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.43.0