diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/quickscreen.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index 1ddae2390a..de0a0ba61a 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c | |||
@@ -65,6 +65,13 @@ static void quickscreen_fix_viewports(struct gui_quickscreen *qs, | |||
65 | int left_width, right_width, bottom_lines = 2; | 65 | int left_width, right_width, bottom_lines = 2; |
66 | unsigned char *s; | 66 | unsigned char *s; |
67 | int nb_lines = viewport_get_nb_lines(parent); | 67 | int nb_lines = viewport_get_nb_lines(parent); |
68 | |||
69 | /* nb_lines only returns the number of fully visible lines, small screens | ||
70 | or really large fonts could cause problems with the calculation below. | ||
71 | */ | ||
72 | if(nb_lines==0) | ||
73 | nb_lines++; | ||
74 | |||
68 | char_height = parent->height/nb_lines; | 75 | char_height = parent->height/nb_lines; |
69 | 76 | ||
70 | /* center the icons VP first */ | 77 | /* center the icons VP first */ |