diff options
-rw-r--r-- | frontends/gtk/bitmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/frontends/gtk/bitmap.c b/frontends/gtk/bitmap.c index 36b614cf9..e7b859d06 100644 --- a/frontends/gtk/bitmap.c +++ b/frontends/gtk/bitmap.c @@ -478,6 +478,10 @@ bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content) * aspect ratio of the required thumbnail. */ cheight = ((cwidth * dheight) + (dwidth / 2)) / dwidth; + /* At this point, we MUST have decided to render something non-zero sized */ + assert(cwidth > 0); + assert(cheight > 0); + /* Create surface to render into */ surface = cairo_surface_create_similar(dsurface, CAIRO_CONTENT_COLOR_ALPHA, cwidth, cheight); |