From f513001798f06bc504ebe51be67d2172892f8927 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Thu, 22 Nov 2012 21:55:11 +0100 Subject: [PATCH] #942 segfault with --log-level=debug when random buildings enabled --- simgear/scene/tgdb/obj.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/scene/tgdb/obj.cxx b/simgear/scene/tgdb/obj.cxx index 0361f74a..5336ada4 100644 --- a/simgear/scene/tgdb/obj.cxx +++ b/simgear/scene/tgdb/obj.cxx @@ -789,7 +789,7 @@ struct SGTileGeometryBin { triangleBuildingList.clear(); } - SG_LOG(SG_TERRAIN, SG_DEBUG, "Random Buildings: " << bin->getNumBuildings()); + SG_LOG(SG_TERRAIN, SG_DEBUG, "Random Buildings: " << ((bin) ? bin->getNumBuildings() : 0)); SG_LOG(SG_TERRAIN, SG_DEBUG, " Dropped due to mask: " << mask_dropped); SG_LOG(SG_TERRAIN, SG_DEBUG, " Dropped due to random object: " << random_dropped); SG_LOG(SG_TERRAIN, SG_DEBUG, " Dropped due to other buildings: " << building_dropped); -- 2.39.5