From 54c7aaca2355973dd33359210b280b4d79d54593 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Sat, 27 Jul 2002 20:14:19 +0000 Subject: [PATCH] Check for NULL before dereferencing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/bitmap.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/motif/bitmap.cpp b/src/motif/bitmap.cpp index 9e5d80983e..fe00dc46fa 100644 --- a/src/motif/bitmap.cpp +++ b/src/motif/bitmap.cpp @@ -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; -- 2.45.2