]> git.openpandora.org Git - pandora-libraries.git/commitdiff
mmenu: minimal fix for the bad skin crash sz_173
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 13 Dec 2015 22:08:56 +0000 (00:08 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 13 Dec 2015 22:08:56 +0000 (00:08 +0200)
minimenu/mmui.c

index abdd63b739e24698bc30323df4c5c31628fa77f1..7282b7100086badbf426f84ba9fdf82e109d5f5d 100644 (file)
@@ -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 ) {