X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec6aa8ecd517a14139091c436d7e103b53ba959a..81001ff1337bbbf5ed60d6ab1e2a2482392d2126:/src/motif/bitmap.cpp diff --git a/src/motif/bitmap.cpp b/src/motif/bitmap.cpp index e5b3c2c308..fe00dc46fa 100644 --- a/src/motif/bitmap.cpp +++ b/src/motif/bitmap.cpp @@ -143,7 +143,7 @@ wxBitmap::wxBitmap(void *data, long type, int width, int height, int depth) (void) Create(data, type, width, height, depth); } -wxBitmap::wxBitmap(const wxString& filename, long type) +wxBitmap::wxBitmap(const wxString& filename, int type) { LoadFile(filename, (int)type); } @@ -829,6 +829,8 @@ void wxBitmap::InitStandardHandlers() WXPixmap wxBitmap::GetLabelPixmap (WXWidget w) { + if (!M_BITMAPDATA) + return (WXPixmap)NULL; if (M_BITMAPDATA->m_image == (WXPixmap) 0) return M_BITMAPDATA->m_pixmap; @@ -905,7 +907,9 @@ WXPixmap wxBitmap::GetArmPixmap (WXWidget w) WXPixmap wxBitmap::GetInsensPixmap (WXWidget w) { Display *dpy = (Display*) M_BITMAPDATA->m_display; - + + if (!M_BITMAPDATA) + return (WXPixmap)NULL; if (M_BITMAPDATA->m_insensPixmap) return M_BITMAPDATA->m_insensPixmap;