From: cloudwalk Date: Fri, 24 Jul 2020 16:00:52 +0000 (+0000) Subject: image_png: Fix library load order. Fixes broken external textures in some games X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b13cfcdd862ad426857b9e5825f6c73576d0358c;p=xonotic%2Fdarkplaces.git image_png: Fix library load order. Fixes broken external textures in some games git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12870 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/image_png.c b/image_png.c index 9c712d15..7ef74f9a 100644 --- a/image_png.c +++ b/image_png.c @@ -172,16 +172,14 @@ qboolean PNG_OpenLibrary (void) return true; // Load the DLL - if(!Sys_LoadLibrary (dllnames, &png14_dll, pngfuncs)) - { - if(qpng_access_version_number() / 100 >= 104) - return false; - if(!Sys_LoadLibrary (dllnames, &png_dll, png14funcs)) + if(!Sys_LoadLibrary (dllnames, &png_dll, pngfuncs)) + return false; + if(qpng_access_version_number() / 100 >= 104) + if(!Sys_LoadLibrary (dllnames, &png14_dll, png14funcs)) { - Sys_UnloadLibrary (&png14_dll); + Sys_UnloadLibrary (&png_dll); return false; } - } return true; }