From fa98a771e34bbbfe95530e921ce185e7b6a4d87d Mon Sep 17 00:00:00 2001 From: Mariano Reingart Date: Mon, 29 Sep 2014 04:14:17 +0000 Subject: [PATCH] Copy pixmap to match others ctors in wxQT, thanks @seandpagnier This should fix a double free crash git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/qt/bitmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/bitmap.cpp b/src/qt/bitmap.cpp index 20ca5808a8..2265de7aaa 100644 --- a/src/qt/bitmap.cpp +++ b/src/qt/bitmap.cpp @@ -122,7 +122,7 @@ class wxBitmapRefData: public wxGDIRefData wxBitmapRefData( const wxBitmapRefData& data ) : wxGDIRefData() { m_mask = NULL; - m_qtPixmap = data.m_qtPixmap; + m_qtPixmap = new QPixmap(data.m_qtPixmap->handle()); } wxBitmapRefData( int width, int height, int depth ) : wxGDIRefData()