From 56ff4b760e0a3f9b6c8d00015bbb4810ddab0db7 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Wed, 24 Mar 2010 18:26:13 +0000 Subject: fixed #1187 --- src/gui.py | 3 --- src/window.py | 11 +++++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gui.py b/src/gui.py index 9be69f48..a9c2fa33 100644 --- a/src/gui.py +++ b/src/gui.py @@ -270,9 +270,6 @@ class Gui(object): room = self.get_room_by_name(from_room) if not room: return - # if stanza.getType() == 'error': - # print stanza - # msg = _("Error: %s") % stanza.getError() else: msg = None affiliation = stanza.getAffiliation() diff --git a/src/window.py b/src/window.py index 0df6c7e7..f0ce7aad 100644 --- a/src/window.py +++ b/src/window.py @@ -26,8 +26,15 @@ class Win(object): def _resize(self, height, width, y, x, parent_win): self.height, self.width, self.x, self.y = height, width, x, y - self.win = parent_win.subwin(height, width, y, x) - self.win.leaveok(1) + try: + self.win = parent_win.subwin(height, width, y, x) + self.win.leaveok(1) + except: + # Happens when the C function subwin fails. The man + # doesn't give a reason for this to happen, so I can't + # really fix this. + # just don't crash when this happens. + pass def refresh(self): self.win.noutrefresh() -- cgit v1.2.3