]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - misc/source/darkplaces-src/image.c
Update the darkplaces engine source
[voretournament/voretournament.git] / misc / source / darkplaces-src / image.c
index 988fbef8e7f27b4a8abcfaf89edb8e92cecea14e..4f85e83e43281148ab1be7af31913e56ce77f888 100644 (file)
@@ -966,11 +966,13 @@ unsigned char *loadimagepixelsbgra (const char *filename, qboolean complain, qbo
                                        {
                                                int mymiplevel2 = miplevel ? *miplevel : 0;
                                                data2 = format->loadfunc(f, (int)filesize, &mymiplevel2);
-                                               if(mymiplevel != mymiplevel2)
-                                                       Host_Error("loadimagepixelsbgra: miplevels differ");
+                                               if(data2 && mymiplevel == mymiplevel2)
+                                                       Image_CopyAlphaFromBlueBGRA(data, data2, image_width, image_height);
+                                               else
+                                                       Con_Printf("loadimagepixelsrgba: corrupt or invalid alpha image %s_alpha\n", basename);
+                                               if(data2)
+                                                       Mem_Free(data2);
                                                Mem_Free(f);
-                                               Image_CopyAlphaFromBlueBGRA(data, data2, image_width, image_height);
-                                               Mem_Free(data2);
                                        }
                                }
                                if (developer_loading.integer)