Salome HOME
Avoid referencing memory of an automatic variable
authoreap <eap@opencascade.com>
Mon, 15 Oct 2012 14:27:55 +0000 (14:27 +0000)
committereap <eap@opencascade.com>
Mon, 15 Oct 2012 14:27:55 +0000 (14:27 +0000)
commit0f6b40b23950ac328d92f87713dd6d24dc5db452
treeb840bdb0a4546f36e89a402a2a869f4f6cb76a4b
parentb4d9638c8cc0688602d1952676a65f3efe2e84cb
Avoid referencing memory of an automatic variable

   struct StdParam
   {
-    const char* text() const { return myText.toLatin1().constData(); }
+    const char* text() const {
+      ((QByteArray&) myTextAsBytes) = myText.toLatin1(); return myTextAsBytes.constData();
+    }
src/SMESHGUI/SMESHGUI_Hypotheses.h