Salome HOME
Fix a bug of SALOMEGUI_Swig library: method getSelected() should return a copy of...
[modules/gui.git] / src / SALOME_SWIG / SALOMEGUI_Swig.cxx
index 848e4167dfb8b58b7c34bcf636beda19c949a96f..7c79a6b0bac49b4fb64b2a64266d056169ef4077 100644 (file)
@@ -290,7 +290,7 @@ public:
 const char* SALOMEGUI_Swig::getSelected( int index )
 {
   QString result = ProcessEvent( new TGetSelectedEvent( index ) );
-  return result.isEmpty() ? NULL : result.latin1();
+  return result.isEmpty() ? NULL : strdup(result.latin1());
 }
 
 /*!