]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/image.cpp
fixed bug in wxMemoryInput/OutputStream::OnSysRead/Write that caused incorrect LastRe...
[wxWidgets.git] / src / common / image.cpp
index ee63a318c45ad5ec572d73ad124c8823022390d3..d7a1ea7cd45ec2f40db93069049db0ebaec010b0 100644 (file)
@@ -127,6 +127,8 @@ wxImage::wxImage( const wxImage* image )
 
 void wxImage::Create( int width, int height )
 {
+    UnRef();
+
     m_refData = new wxImageRefData();
 
     M_IMGDATA->m_data = (unsigned char *) malloc( width*height*3 );