Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
hexagonrecursion committed Aug 26, 2024
1 parent 3039d02 commit 67a2644
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion colobot-base/src/object/task/taskbuild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ Error CTaskBuild::Start(ObjectType type)
if (IsObjectCarryingCargo(m_object)) return ERR_MANIP_BUSY;

CObject* metal = SearchMetalObject(oAngle, 2.0f, 100.0f, Math::PI*0.25f, err);
m_metal_id = metal->GetID();
if ( metal ) m_metal_id = metal->GetID();
if ( err == ERR_BUILD_METALNEAR && metal != nullptr )
{
err = FlatFloor();
Expand Down

0 comments on commit 67a2644

Please sign in to comment.