summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-05 00:28:26 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-05 00:28:26 +0000
commit2e285cf426f588438dd073b4ce8737f3c8ba8bd3 (patch)
treeaf66f11683f61c89d32d9afee0e8d0f5420bdbf0
parent073972a5c0cd312d37ed7dda841ba6cf93414574 (diff)
downloadpoezio-2e285cf426f588438dd073b4ce8737f3c8ba8bd3.tar.gz
poezio-2e285cf426f588438dd073b4ce8737f3c8ba8bd3.tar.bz2
poezio-2e285cf426f588438dd073b4ce8737f3c8ba8bd3.tar.xz
poezio-2e285cf426f588438dd073b4ce8737f3c8ba8bd3.zip
fix a crash on resize of size 0×0
-rw-r--r--src/windows.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/windows.py b/src/windows.py
index 682d6487..744443b6 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -56,6 +56,8 @@ class Win(object):
pass
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._win = curses.newwin(height, width, y, x)