Avoid NULL pointer dereference when calling GetScaleFactor() on invalid bitmap with GTK+3

This commit is contained in:
Paul Cornett
2018-10-28 09:15:33 -07:00
parent 5d5654742f
commit dd1a6a6d35

View File

@@ -981,6 +981,8 @@ bool wxBitmap::CreateScaled(int w, int h, int depth, double scale)
double wxBitmap::GetScaleFactor() const double wxBitmap::GetScaleFactor() const
{ {
wxCHECK_MSG(m_refData, -1, "invalid bitmap");
return M_BMPDATA->m_scaleFactor; return M_BMPDATA->m_scaleFactor;
} }