summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/ext/img_display.py2
1 files changed, 2 insertions, 0 deletions
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