From: vsr Date: Mon, 22 Aug 2005 07:02:01 +0000 (+0000) Subject: Fix a bug of SALOMEGUI_Swig library: method getSelected() should return a copy of... X-Git-Tag: T_3_0_2a1~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f10864e4278fd7f3affb09708648954f904bcc53;p=modules%2Fgui.git Fix a bug of SALOMEGUI_Swig library: method getSelected() should return a copy of string. --- diff --git a/src/SALOME_SWIG/SALOMEGUI_Swig.cxx b/src/SALOME_SWIG/SALOMEGUI_Swig.cxx index 848e4167d..7c79a6b0b 100644 --- a/src/SALOME_SWIG/SALOMEGUI_Swig.cxx +++ b/src/SALOME_SWIG/SALOMEGUI_Swig.cxx @@ -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()); } /*!