fix a crash on resize of size 0×0

This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2011-01-05 00:28:26 +00:00
parent 073972a5c0
commit 2e285cf426

View file

@ -56,6 +56,8 @@ class Win(object):
pass pass
def _resize(self, height, width, y, x, parent_win): def _resize(self, height, width, y, x, parent_win):
if height == 0 or width == 0:
return
self.height, self.width, self.x, self.y = height, width, x, y self.height, self.width, self.x, self.y = height, width, x, y
self._win = curses.newwin(height, width, y, x) self._win = curses.newwin(height, width, y, x)