# HG changeset patch # User unc0rr # Date 1420234113 -10800 # Node ID 42af3bfc832cb0b6a4de45eae29e8cbe2048aa00 # Parent b22c57f45e86ce4ded247f5df097d004c2d7f428 Fix crash in case of critical image missing diff -r b22c57f45e86 -r 42af3bfc832c hedgewars/uStore.pas --- a/hedgewars/uStore.pas Fri Jan 02 00:14:49 2015 +0300 +++ b/hedgewars/uStore.pas Sat Jan 03 00:28:33 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;