From cca15e449048b097e151d1cd21fab272b38ed425 Mon Sep 17 00:00:00 2001 From: Metallicow Date: Sat, 8 Aug 2020 00:43:29 -0500 Subject: [PATCH] Fix wxassertionerror. Bitmap w or h should not be 0 --- wx/lib/agw/piectrl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wx/lib/agw/piectrl.py b/wx/lib/agw/piectrl.py index 199a9a75..44d3466b 100644 --- a/wx/lib/agw/piectrl.py +++ b/wx/lib/agw/piectrl.py @@ -524,8 +524,8 @@ class PieCtrl(wx.Window): def RecreateCanvas(self): """ Recreates the :class:`PieCtrl` container (canvas). """ - self._canvasbitmap = wx.Bitmap(self.GetSize().GetWidth(), - self.GetSize().GetHeight()) + self._canvasbitmap = wx.Bitmap(self.GetSize().GetWidth() or 1, + self.GetSize().GetHeight() or 1) self._canvasDC.SelectObject(self._canvasbitmap)