From f10864e4278fd7f3affb09708648954f904bcc53 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 22 Aug 2005 07:02:01 +0000 Subject: [PATCH] Fix a bug of SALOMEGUI_Swig library: method getSelected() should return a copy of string. --- src/SALOME_SWIG/SALOMEGUI_Swig.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); } /*! -- 2.39.2