summaryrefslogtreecommitdiff
path: root/src/glibext/gbufferview.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-03-21 07:51:08 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-03-21 07:51:08 (GMT)
commitc6c8ddc7823976f5751342ea5eb38c21465bd124 (patch)
tree92422ef3d0b7994a101b77d31b6e4c11d1a70e50 /src/glibext/gbufferview.c
parentc8bcac5e5b09c068edf50cc687c7e0cdc84dd6af (diff)
Prevented a floating point exception while zooming.
Diffstat (limited to 'src/glibext/gbufferview.c')
-rw-r--r--src/glibext/gbufferview.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glibext/gbufferview.c b/src/glibext/gbufferview.c
index db8da28..cfe215d 100644
--- a/src/glibext/gbufferview.c
+++ b/src/glibext/gbufferview.c
@@ -1121,6 +1121,8 @@ void g_buffer_view_draw(const GBufferView *view, cairo_t *cr, gint virt_y, const
line_height = g_buffer_cache_get_line_height(view->cache) * scale;
+ line_height = MAX(line_height, 1);
+
/* Indice et point de départ */
first = view->first;