]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed crash under GTK+ 2.0
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 26 Mar 2002 18:42:10 +0000 (18:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 26 Mar 2002 18:42:10 +0000 (18:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/colour.cpp
src/gtk1/colour.cpp

index 47af43accc01b8104a185dae14a22294e0fad5cd..1b82a30b01a39f2cfce2d81c7b5ea25b7aa70792 100644 (file)
@@ -117,8 +117,8 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
     FreeColour();
     
 #ifdef __WXGTK20__
-    if ((m_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||
-       (m_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR))
+    if ( (cmap->visual->type == GDK_VISUAL_GRAYSCALE) ||
+            (cmap->visual->type == GDK_VISUAL_PSEUDO_COLOR) )
 #else
     GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap;
     if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||
index 47af43accc01b8104a185dae14a22294e0fad5cd..1b82a30b01a39f2cfce2d81c7b5ea25b7aa70792 100644 (file)
@@ -117,8 +117,8 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
     FreeColour();
     
 #ifdef __WXGTK20__
-    if ((m_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||
-       (m_colormap->visual->type == GDK_VISUAL_PSEUDO_COLOR))
+    if ( (cmap->visual->type == GDK_VISUAL_GRAYSCALE) ||
+            (cmap->visual->type == GDK_VISUAL_PSEUDO_COLOR) )
 #else
     GdkColormapPrivate *private_colormap = (GdkColormapPrivate*) cmap;
     if ((private_colormap->visual->type == GDK_VISUAL_GRAYSCALE) ||