X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd3b7e098d6545688eeee0fedd04346173493875..b78d046d82b43135f3ab0c8fd5edbd9e68ad712b:/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);