From: akl Date: Mon, 18 Feb 2013 06:05:35 +0000 (+0000) Subject: Fix SIGSEGV problem at creation of another new study. X-Git-Tag: V6_main_FINAL~37 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f36cb9b8c3df0af6b4d78affea899742f3b4b90b;p=modules%2Fgui.git Fix SIGSEGV problem at creation of another new study. --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index f36c4796d..66cab580c 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -159,7 +159,7 @@ extern "C" SALOMEAPP_EXPORT SUIT_Application* createApplication() /*!Constructor.*/ SalomeApp_Application::SalomeApp_Application() - : LightApp_Application(), myNoteBook( 0 ) + : LightApp_Application() { connect( desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ), Qt::UniqueConnection ); @@ -1608,8 +1608,6 @@ void SalomeApp_Application::objectBrowserColumnsVisibility() /*! Set SalomeApp_NoteBook pointer */ void SalomeApp_Application::setNoteBook( SalomeApp_NoteBook* theNoteBook ) { - if ( myNoteBook && myNoteBook != theNoteBook ) - delete myNoteBook; myNoteBook = theNoteBook; } diff --git a/src/SalomeApp/SalomeApp_Application.h b/src/SalomeApp/SalomeApp_Application.h index fbd778537..7064c1eb2 100644 --- a/src/SalomeApp/SalomeApp_Application.h +++ b/src/SalomeApp/SalomeApp_Application.h @@ -44,6 +44,8 @@ #include "SALOMEDSClient.hxx" +#include + class LightApp_Preferences; class SalomeApp_Study; class SalomeApp_NoteBook; @@ -189,7 +191,7 @@ private: void createExtraActions(); private: - SalomeApp_NoteBook* myNoteBook; + QPointer myNoteBook; QMap myExtActions; // Map signals: