X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd3b7e098d6545688eeee0fedd04346173493875..2d956b58023a4955313a1c1531bc70a0deb0b831:/src/gtk/dataobj.cpp diff --git a/src/gtk/dataobj.cpp b/src/gtk/dataobj.cpp index cae5a43dfb..cfbf0deb8a 100644 --- a/src/gtk/dataobj.cpp +++ b/src/gtk/dataobj.cpp @@ -358,7 +358,7 @@ void wxBitmapDataObject::DoConvertToPng() wxCHECK_RET( wxImage::FindHandler(wxBITMAP_TYPE_PNG) != NULL, wxT("You must call wxImage::AddHandler(new wxPNGHandler); to be able to use clipboard with bitmaps!") ); - wxImage image(m_bitmap); + wxImage image = m_bitmap.ConvertToImage(); wxCountingOutputStream count; image.SaveFile(count, wxBITMAP_TYPE_PNG);