From 55a52554ee901e410eca840aaa5658cf57bd63bd Mon Sep 17 00:00:00 2001 From: Myk Date: Fri, 23 Oct 2020 13:55:14 -0700 Subject: [PATCH] use CheckDFObject instead of static cast Co-authored-by: Alan --- plugins/buildingplan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/buildingplan.cpp b/plugins/buildingplan.cpp index 703e567b7..82551be23 100644 --- a/plugins/buildingplan.cpp +++ b/plugins/buildingplan.cpp @@ -303,7 +303,7 @@ static bool construct_planned_building() return false; } - auto bld = static_cast(LuaWrapper::get_object_ref(L, -1)); + auto bld = Lua::CheckDFObject(L, -1); lua_pop(L, 1); if (!bld)