diff --git a/src/conio/x_events.c b/src/conio/x_events.c index aacc42b574edb444ea688463fac7a76809e8ef09..c5a4084d6d8cd58522a7d8f04208165043e64849 100644 --- a/src/conio/x_events.c +++ b/src/conio/x_events.c @@ -601,8 +601,12 @@ local_draw_rect(struct rectlist *rect) // Scale... pthread_mutex_lock(&vstatlock); - bitmap_get_scaled_win_size(x_cvstat.scaling, &w, &h, vstat.winwidth, vstat.winheight); + bitmap_get_scaled_win_size(vstat.scaling, &w, &h, vstat.winwidth, vstat.winheight); pthread_mutex_unlock(&vstatlock); + if (w < rect->rect.width || h < rect->rect.height) { + bitmap_drv_free_rect(rect); + return; + } source = do_scale(rect, w, h); bitmap_drv_free_rect(rect); if (source == NULL)