]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/toolbar.cpp
fixes for user dash handling (patch 717736)
[wxWidgets.git] / src / motif / toolbar.cpp
index a4279e48bf899d2d7355cf98b0bf384860b2e062..08413938116aa073e299ca98bef77a5c02a0cb2d 100644 (file)
@@ -389,13 +389,13 @@ bool wxToolBar::Realize()
                     wxColour col;
                     col.SetPixel(backgroundPixel);
 
-                    if( bmp.GetMask() )
+                    if( bmp.Ok() && bmp.GetMask() )
                     {
                         bmp = wxCreateMaskedBitmap(bmp, col);
                         tool->SetNormalBitmap(bmp);
                     }
 
-                    if( insensBmp.GetMask() )
+                    if( insensBmp.Ok() && insensBmp.GetMask() )
                     {
                         insensBmp = wxCreateMaskedBitmap(insensBmp, col);
                         tool->SetDisabledBitmap(insensBmp);
@@ -415,12 +415,12 @@ bool wxToolBar::Realize()
                 wxColour col;
                 col.SetPixel(backgroundPixel);
 
-                pixmap = (Pixmap) bmp.GetPixmap();
+                pixmap = (Pixmap) bmp.GetDrawable();
                 {
                     wxBitmap tmp = tool->GetDisabledBitmap();
 
                     insensPixmap = tmp.Ok() ?
-                            (Pixmap)tmp.GetPixmap() :
+                            (Pixmap)tmp.GetDrawable() :
                             tool->GetInsensPixmap();
                 }