Fix read of freed memory found with valgrind
authorunc0rr
Thu, 13 Feb 2014 22:04:56 +0400
changeset 10135 8fd3e38bd4f2
parent 10134 81d733899e06
child 10136 f0da90f58c98
Fix read of freed memory found with valgrind
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Wed Feb 12 23:46:24 2014 +0400
+++ b/hedgewars/uGearsHandlersMess.pas	Thu Feb 13 22:04:56 2014 +0400
@@ -1044,6 +1044,7 @@
                     end;
             end;
         DeleteGear(Gear);
+        exit;
     end;
 
     if (Gear^.Timer > 0) then