# HG changeset patch # User unc0rr # Date 1420234174 -10800 # Node ID 205cbe1374614343b43d0b6c025860c2214a98e3 # Parent 34c1afbda24a746cdcbf2f6dfa2ca74d237a8813 Fix crash in case of critical image missing diff -r 34c1afbda24a -r 205cbe137461 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Fri Jan 02 23:54:11 2015 +0300 +++ b/hedgewars/uStore.pas Sat Jan 03 00:29:34 2015 +0300 @@ -611,17 +611,17 @@ // loading failed if tmpsurf = nil then begin - - // anounce that loading failed - OutError(msgFailed, false); - // output sdl error if loading failed when data source was available if rwops <> nil then begin + // anounce that loading failed + OutError(msgFailed, false); + SDLTry(false, (imageFlags and ifCritical) <> 0); // rwops was already freed by IMG_Load_RW rwops:= nil; - end; + end else + OutError(msgFailed, (imageFlags and ifCritical) <> 0); exit; end;