From: ThorstenB Date: Thu, 22 Nov 2012 20:55:11 +0000 (+0100) Subject: #942 segfault with --log-level=debug when random buildings enabled X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f513001798f06bc504ebe51be67d2172892f8927;p=simgear.git #942 segfault with --log-level=debug when random buildings enabled --- 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);