From f2cc491647fa0cb2cd37488d007d549a5c80ebc2 Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 10 Feb 2013 21:13:11 +0100 Subject: ext.img_display: don't draw image when fonth/fontw is 0 --- ranger/ext/img_display.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py index 191f5aa4..a89f6d8b 100644 --- a/ranger/ext/img_display.py +++ b/ranger/ext/img_display.py @@ -48,6 +48,8 @@ def draw(path, start_x, start_y, max_width, max_height): They are expressed in number of characters. """ fontw, fonth = _get_font_dimensions() + if fontw == 0 or fonth == 0: + return max_width_pixels = max_width * fontw max_height_pixels = max_height * fonth -- cgit 1.4.1-2-gfad0