X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/887dd52f06a985ec0455e91f4b3d2b091a1b1c7b..1d0edc0f7306aac10a75c545f9cace25d3cee83d:/src/gtk1/colour.cpp diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index d4b9194145..1b82a30b01 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -35,6 +35,13 @@ public: m_hasPixel = FALSE; } + wxColourRefData(const wxColourRefData& data) + { + m_color = data.m_color; + m_colormap = data.m_colormap; + m_hasPixel = data.m_hasPixel; + } + ~wxColourRefData() { FreeColour(); @@ -110,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) ||