diff --git a/src/common/image.cpp b/src/common/image.cpp index 85ab31c7c2..78fe5b82a3 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -635,6 +635,8 @@ wxImage wxImage::ResampleBox(int width, int height) const unsigned char* dst_data = ret_image.GetData(); unsigned char* dst_alpha = NULL; + wxCHECK_MSG( dst_data, ret_image, wxS("unable to create image") ); + if ( src_alpha ) { ret_image.SetAlpha(); @@ -782,6 +784,8 @@ wxImage wxImage::ResampleBilinear(int width, int height) const unsigned char* dst_data = ret_image.GetData(); unsigned char* dst_alpha = NULL; + wxCHECK_MSG( dst_data, ret_image, wxS("unable to create image") ); + if ( src_alpha ) { ret_image.SetAlpha(); @@ -961,6 +965,8 @@ wxImage wxImage::ResampleBicubic(int width, int height) const unsigned char* dst_data = ret_image.GetData(); unsigned char* dst_alpha = NULL; + wxCHECK_MSG( dst_data, ret_image, wxS("unable to create image") ); + if ( src_alpha ) { ret_image.SetAlpha();