--- a/hedgewars/CMakeLists.txt Sun Mar 02 00:34:18 2014 +0400
+++ b/hedgewars/CMakeLists.txt Mon Mar 03 22:36:30 2014 +0400
@@ -211,8 +211,7 @@
add_flag_prepend(CMAKE_Pascal_FLAGS "-o${LIBRARY_OUTPUT_PATH}/${engine_output_name}")
add_definitions(-dHWLIBRARY)
- set_source_files_properties(hwLibrary.pas PROPERTIES OBJECT_DEPENDS "${sourcefiles_sofar}")
- set_source_files_properties(hwLibrary.pas PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/hwengine.pas")
+ set_source_files_properties(hwLibrary.pas PROPERTIES OBJECT_DEPENDS "${sourcefiles_sofar};${CMAKE_CURRENT_SOURCE_DIR}/hwengine.pas")
add_library(hwengine SHARED hwLibrary.pas)
else()
# no need to change name here because target has same name
--- a/hedgewars/uGearsHandlersMess.pas Sun Mar 02 00:34:18 2014 +0400
+++ b/hedgewars/uGearsHandlersMess.pas Mon Mar 03 22:36:30 2014 +0400
@@ -1316,6 +1316,13 @@
begin
cArtillery := true;
HHGear := Gear^.Hedgehog^.Gear;
+
+ if HHGear = nil then
+ begin
+ DeleteGear(gear);
+ exit
+ end;
+
HHGear^.State := HHGear^.State or gstNotKickable;
HedgehogChAngle(HHGear);
if not cLaserSighting then