From: Severin Meyer Date: Mon, 15 Dec 2014 16:15:47 +0000 (+0100) Subject: Prevent calls to draw_PictureSize with an empty source string X-Git-Tag: xonotic-v0.8.0~71^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4cbdff91670503597f6e8a763c3ec89e2307f178;p=xonotic%2Fxonotic-data.pk3dir.git Prevent calls to draw_PictureSize with an empty source string --- diff --git a/qcsrc/menu/item/image.c b/qcsrc/menu/item/image.c index 1d5471e15..8d1a6de86 100644 --- a/qcsrc/menu/item/image.c +++ b/qcsrc/menu/item/image.c @@ -69,7 +69,8 @@ void Image_updateAspect(entity me) vector sz = '0 0 0'; if(me.forcedAspect < 0) { - sz = draw_PictureSize(me.src); + if (me.src != "") + sz = draw_PictureSize(me.src); if(sz_x <= 0 || sz_y <= 0) { // image is broken or doesn't exist, set the size for the placeholder image