]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix SIGSEGV problem at creation of another new study.
authorakl <akl@opencascade.com>
Mon, 18 Feb 2013 06:05:35 +0000 (06:05 +0000)
committerakl <akl@opencascade.com>
Mon, 18 Feb 2013 06:05:35 +0000 (06:05 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Application.h

index f36c4796d5fe5ba477371e0a2b46021663656b89..66cab580cb677adf5fe5686626f1dbd213e6e1bb 100644 (file)
@@ -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;
 }
 
index fbd778537bb1c05bc4c0b3a361b9257bf4e194c6..7064c1eb20319d65bbbfb7304120511fd6084afc 100644 (file)
@@ -44,6 +44,8 @@
 
 #include "SALOMEDSClient.hxx"
 
+#include <QPointer>
+
 class LightApp_Preferences;
 class SalomeApp_Study;
 class SalomeApp_NoteBook;
@@ -189,7 +191,7 @@ private:
   void                                createExtraActions();
 
 private:
-  SalomeApp_NoteBook*                 myNoteBook;
+  QPointer<SalomeApp_NoteBook>        myNoteBook;
   QMap<QString, QAction*>             myExtActions; // Map <AttributeUserID, QAction>
 
 signals: