diff options
author | hut <hut@lavabit.com> | 2013-02-10 21:13:11 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2013-02-10 21:13:11 +0100 |
commit | f2cc491647fa0cb2cd37488d007d549a5c80ebc2 (patch) | |
tree | e13d855a867c45376765ab6f2c7983600356b674 /ranger | |
parent | 2fc163162cb450e78a7b5f557da27eb8dc778141 (diff) | |
download | ranger-f2cc491647fa0cb2cd37488d007d549a5c80ebc2.tar.gz |
ext.img_display: don't draw image when fonth/fontw is 0
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/ext/img_display.py | 2 |
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 |