X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/329e276aa0f06aef6e1dcde5c197088f4695d449..7948c0c24401c496c04da3c28f1f1f2f282ba327:/src/motif/bitmap.cpp diff --git a/src/motif/bitmap.cpp b/src/motif/bitmap.cpp index 4747f9ab1d..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); } @@ -229,7 +229,7 @@ bool wxBitmap::Create(void *data, long type, int width, int height, int depth) wxBitmapHandler *handler = FindHandler(type); if ( handler == NULL ) { - wxLogWarning("no data bitmap handler for type %d defined.", type); + wxLogWarning("no data bitmap handler for type %ld defined.", type); return FALSE; } @@ -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;