X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftools.c;h=33b677954947107346e76e69d65f778027d1e2f6;hp=459f85a769cf82263a4229a219130bcc973461af;hb=636dfa7f332268725c5377a7bca40f1ad83ad484;hpb=38d9385eff4ea0edef250a3ee7068614f22c9c88 diff --git a/src/tools.c b/src/tools.c index 459f85a7..33b67795 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1150,10 +1150,12 @@ void FadeSkipNextFadeOut(void) static Bitmap *getBitmapFromGraphicOrDefault(int graphic, int default_graphic) { + if (graphic == IMG_UNDEFINED) + return NULL; + boolean redefined = getImageListEntryFromImageID(graphic)->redefined; - return (graphic == IMG_UNDEFINED ? NULL : - graphic_info[graphic].bitmap != NULL || redefined ? + return (graphic_info[graphic].bitmap != NULL || redefined ? graphic_info[graphic].bitmap : graphic_info[default_graphic].bitmap); }