diff --git a/src/bind_building.c b/src/bind_building.c index 714b915dd..b8fb07611 100644 --- a/src/bind_building.c +++ b/src/bind_building.c @@ -193,11 +193,9 @@ static int tolua_building_create(lua_State * L) const char *bname = tolua_tostring(L, 2, 0); if (!r) { log_error("building.create expects a region as argument 1"); - } - if (!bname) { + } else if (!bname) { log_error("building.create expects a name as argument 2"); - } - if (bname) { + } else { const building_type *btype = bt_find(bname); if (btype) { building *b = new_building(btype, r, default_locale);