From 7c0c99a6118be50b239a1586946f192aec7748ac Mon Sep 17 00:00:00 2001 From: stv Date: Mon, 27 Oct 2008 13:01:06 +0000 Subject: [PATCH] Fix of crash when the creation of study fails (new created empty study can't successful perform method createDocument() and should be deleted) --- src/STD/STD_Application.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/STD/STD_Application.cxx b/src/STD/STD_Application.cxx index 8af1e6246..9f8d9fb4f 100755 --- a/src/STD/STD_Application.cxx +++ b/src/STD/STD_Application.cxx @@ -275,8 +275,9 @@ bool STD_Application::onNewDoc( const QString& name ) studyCreated( activeStudy() ); else { - delete activeStudy(); + SUIT_Study* st = activeStudy(); setActiveStudy( 0 ); + delete st; } } else -- 2.39.2