--- 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;