]> git.saurik.com Git - wxWidgets.git/commitdiff
Moved allocation of m_imData or key down gives seg fault
authorJulian Smart <julian@anthemion.co.uk>
Thu, 2 Jun 2005 09:49:29 +0000 (09:49 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 2 Jun 2005 09:49:29 +0000 (09:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp
src/gtk1/window.cpp

index a0acf3aa000887eda9e454dbfe78a879a0240df7..ddf893813842cbaeff553b8239b218425cbe854a 100644 (file)
@@ -2931,6 +2931,11 @@ void wxWindowGTK::PostCreation()
 {
     wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
 
+#ifdef __WXGTK20__
+    // Create input method handler
+    m_imData = new wxGtkIMData;
+#endif
+
     if (m_wxwindow)
     {
         if (!m_noExpose)
@@ -2957,9 +2962,6 @@ void wxWindowGTK::PostCreation()
         }
 
 #ifdef __WXGTK20__
-        // Create input method handler
-        m_imData = new wxGtkIMData;
-
         // Cannot handle drawing preedited text yet
         gtk_im_context_set_use_preedit( m_imData->context, FALSE );
 
index a0acf3aa000887eda9e454dbfe78a879a0240df7..ddf893813842cbaeff553b8239b218425cbe854a 100644 (file)
@@ -2931,6 +2931,11 @@ void wxWindowGTK::PostCreation()
 {
     wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
 
+#ifdef __WXGTK20__
+    // Create input method handler
+    m_imData = new wxGtkIMData;
+#endif
+
     if (m_wxwindow)
     {
         if (!m_noExpose)
@@ -2957,9 +2962,6 @@ void wxWindowGTK::PostCreation()
         }
 
 #ifdef __WXGTK20__
-        // Create input method handler
-        m_imData = new wxGtkIMData;
-
         // Cannot handle drawing preedited text yet
         gtk_im_context_set_use_preedit( m_imData->context, FALSE );