]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for a crash with wxUSE_STL == 1: test for failed conversion in GetValue()
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 21 Nov 2004 12:21:14 +0000 (12:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 21 Nov 2004 12:21:14 +0000 (12:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/textctrl.cpp
src/gtk1/textctrl.cpp

index 94718d2f35d306605fa910cc3c1b76b3dacfb3ab..453274792e65a4c73b362607077e67a6e2c2c537 100644 (file)
@@ -518,7 +518,8 @@ wxString wxTextCtrl::GetValue() const
 #else
         wxCharBuffer buffer( wxConvLocal.cWC2WX( wxConvUTF8.cMB2WC( text ) ) );
 #endif
-        tmp = buffer;
+        if ( buffer )
+            tmp = buffer;
 
         g_free( text );
 #else
index 94718d2f35d306605fa910cc3c1b76b3dacfb3ab..453274792e65a4c73b362607077e67a6e2c2c537 100644 (file)
@@ -518,7 +518,8 @@ wxString wxTextCtrl::GetValue() const
 #else
         wxCharBuffer buffer( wxConvLocal.cWC2WX( wxConvUTF8.cMB2WC( text ) ) );
 #endif
-        tmp = buffer;
+        if ( buffer )
+            tmp = buffer;
 
         g_free( text );
 #else