]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Prevent calls to draw_PictureSize with an empty source string
authorSeverin Meyer <sev.ch@web.de>
Mon, 15 Dec 2014 16:15:47 +0000 (17:15 +0100)
committerSeverin Meyer <sev.ch@web.de>
Mon, 15 Dec 2014 16:15:47 +0000 (17:15 +0100)
qcsrc/menu/item/image.c

index 1d5471e15c09d1ea2bb45980648f8477253e5d90..8d1a6de86af32f3f0e9889287df1c49b497b45b0 100644 (file)
@@ -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