X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68567a967bc8afd37a40cb9a7ee5021b9ee6cd96..9a3952fad895c37a0ae8c34a968b7ae7ff8b9a55:/src/gtk/bitmap.cpp diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 7f0b385f9b..cb358da34a 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -455,7 +455,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight, old_x = x; } - if (bpp == 1) + if ( dst ) { if (!pixval) { @@ -480,14 +480,14 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight, } // do not forget the last byte - if ((bpp == 1) && (width % 8 != 0)) + if ( dst && (width % 8 != 0) ) dst[h*dstbyteperline+width/8] = outbyte; } gdk_image_destroy( img ); if (gc) gdk_gc_unref( gc ); - if (bpp == 1) + if ( dst ) { bmp = wxBitmap( (const char *)dst, width, height, 1 ); free( dst ); @@ -1143,12 +1143,6 @@ wxImage wxBitmap::ConvertToImage() const return image; } -wxBitmap::wxBitmap( const wxBitmap& bmp ) - : wxBitmapBase() -{ - Ref( bmp ); -} - wxBitmap::wxBitmap( const wxString &filename, wxBitmapType type ) { LoadFile( filename, type ); @@ -1180,14 +1174,6 @@ wxBitmap::~wxBitmap() { } -wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp ) -{ - if ( m_refData != bmp.m_refData ) - Ref( bmp ); - - return *this; -} - bool wxBitmap::operator == ( const wxBitmap& bmp ) const { return m_refData == bmp.m_refData;