Don't compare reference with null in wxBitmap::UngetRawData()
This doesn't seem to make any sense as this function is always called with non-null "*this" reference from wxPixelData dtor and results in -Waddress warning from gcc 6.
This commit is contained in:
@@ -1374,20 +1374,12 @@ void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBitmap::UngetRawData(wxPixelDataBase& dataBase)
|
void wxBitmap::UngetRawData(wxPixelDataBase& WXUNUSED(data))
|
||||||
{
|
{
|
||||||
#if wxUSE_WXDIB
|
#if wxUSE_WXDIB
|
||||||
if ( !IsOk() )
|
if ( !IsOk() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( !&dataBase )
|
|
||||||
{
|
|
||||||
// invalid data, don't crash -- but don't assert neither as we're
|
|
||||||
// called automatically from wxPixelDataBase dtor and so there is no
|
|
||||||
// way to prevent this from happening
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we're a DDB we need to convert DIB back to DDB now to make the
|
// if we're a DDB we need to convert DIB back to DDB now to make the
|
||||||
// changes made via raw bitmap access effective
|
// changes made via raw bitmap access effective
|
||||||
if ( !GetBitmapData()->m_isDIB )
|
if ( !GetBitmapData()->m_isDIB )
|
||||||
|
Reference in New Issue
Block a user