hedgewars/PascalExports.pas
changeset 3662 a44406f4369b
parent 3661 2378ada8a6ee
child 3668 3f7a95234d8a
--- a/hedgewars/PascalExports.pas	Tue Jul 20 23:30:54 2010 +0200
+++ b/hedgewars/PascalExports.pas	Thu Jul 22 03:08:17 2010 +0200
@@ -191,7 +191,10 @@
 
 function HW_isWeaponRequiringClick: boolean; cdecl; export;
 begin
-    exit( (CurrentHedgehog^.Gear^.State and gstHHChooseTarget) <> 0 )
+    if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then
+        exit( (CurrentHedgehog^.Gear^.State and gstHHChooseTarget) <> 0 )
+    else
+        exit(false);
 end;
 
 function HW_isWeaponTimerable: boolean; cdecl; export;