From f3e0dee205139c28318494fe5d6bec3fe0812951 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 11 May 2007 21:36:53 +0000 Subject: [PATCH] catch exceptions from ConvertToBitmap and bail out git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/lib/imagebrowser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxPython/wx/lib/imagebrowser.py b/wxPython/wx/lib/imagebrowser.py index 576d0bcfbd..72b1346d53 100644 --- a/wxPython/wx/lib/imagebrowser.py +++ b/wxPython/wx/lib/imagebrowser.py @@ -95,7 +95,10 @@ class ImageView(wx.Window): if image is None: return - bmp = image.ConvertToBitmap() + try: + bmp = image.ConvertToBitmap() + except: + return iwidth = bmp.GetWidth() # dimensions of image file iheight = bmp.GetHeight()