Return new wxBitmap for GetDisabledBitmap()

This issue was detected by the clang64 compiler; but, it likely needs
fixed for all compilers.
This commit is contained in:
Tim Stahlhut
2022-05-14 22:46:06 -04:00
committed by Robin Dunn
parent af24dc047e
commit 8e4e69e3b4

View File

@@ -136,11 +136,12 @@ def run():
c.find('GetDisabledBitmap').type = 'const wxBitmap*'
c.find('GetDisabledBitmap').transferBack = True # Python takes ownership of the return value
c.find('GetDisabledBitmap').setCppCode("""\
#ifdef __WXMSW__
return &self->GetDisabledBitmap();
return new wxBitmap(self->GetDisabledBitmap());
#else
return &wxNullBitmap;
return new wxBitmap(wxNullBitmap);
#endif
""")