From f1cb2cfa35efc68ce4443d6ed5633c17c2b9309a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Sat, 12 Sep 2015 17:35:45 -0400 Subject: [PATCH] Fix segmentation fault with the new libstdc++ ABI. Local variable goes out of scope and everything goes boom. --- common/src/Utilities/pxTranslate.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/src/Utilities/pxTranslate.cpp b/common/src/Utilities/pxTranslate.cpp index aba039ea5a..1d314ea68b 100644 --- a/common/src/Utilities/pxTranslate.cpp +++ b/common/src/Utilities/pxTranslate.cpp @@ -29,8 +29,7 @@ const wxChar* __fastcall pxExpandMsg( const wxChar* englishContent ) #if _WIN32 || wxMAJOR_VERSION < 3 return wxGetTranslation(englishContent); #else - wxString translation = wxGetTranslation( englishContent ); - return translation.wc_str(); + return wxGetTranslation(englishContent).wc_str(); #endif } @@ -53,7 +52,6 @@ const wxChar* __fastcall pxGetTranslation( const wxChar* message ) #if _WIN32 || wxMAJOR_VERSION < 3 return wxGetTranslation(message); #else - wxString translation = wxGetTranslation( message ); - return translation.wc_str(); + return wxGetTranslation( message ).wc_str(); #endif }