mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Fix crash in ribbonbar sample
The ArtProvider shouldn't be cloned in this case because SetArtProvider() does not take ownership of the object in this case. Because of that, once the cloned provider goes out of scope and gets garbage collected, future uses will crash. Fixes #141.
This commit is contained in:
@@ -335,7 +335,6 @@ class RibbonFrame(wx.Frame):
|
||||
|
||||
if event.GetGalleryItem() != None:
|
||||
if provider == self._ribbon.GetArtProvider():
|
||||
provider = provider.Clone()
|
||||
gallery.SetArtProvider(provider)
|
||||
|
||||
provider.SetColour(RB.RIBBON_ART_GALLERY_HOVER_BACKGROUND_COLOUR,
|
||||
|
||||
Reference in New Issue
Block a user