From bbcf535c0f998e5250bfbcf5760cbaf6f4d3bc9b Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Mon, 14 Dec 2015 00:08:56 +0200 Subject: [PATCH] mmenu: minimal fix for the bad skin crash --- minimenu/mmui.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/minimenu/mmui.c b/minimenu/mmui.c index abdd63b..7282b71 100644 --- a/minimenu/mmui.c +++ b/minimenu/mmui.c @@ -2472,6 +2472,10 @@ SDL_Surface *ui_scale_image ( SDL_Surface *s, unsigned int maxwidth, int maxheig double scaley = 1000000.0; SDL_Surface *scaled; + if ( maxwidth != -1 && maxwidth > ui_display_context.screen_width ) + // probably bad config + return ( s ); + scalex = (double)maxwidth / (double)s -> w; if ( maxheight == -1 ) { -- 2.39.5