From: Wolfgang Bangerth Date: Tue, 4 Oct 2016 20:12:30 +0000 (-0600) Subject: Do not dereference pointers unless we know that they are non-NULL. X-Git-Tag: v8.5.0-rc1~603^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efd4d9044834554316b4a90a5bcac759ff755fce;p=dealii.git Do not dereference pointers unless we know that they are non-NULL. --- diff --git a/source/grid/tria.cc b/source/grid/tria.cc index e881105112..34b530d6af 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -13539,7 +13539,8 @@ Triangulation::memory_consumption () const mem += sizeof(smooth_grid); mem += MemoryConsumption::memory_consumption (number_cache); mem += sizeof (faces); - mem += MemoryConsumption::memory_consumption (*faces); + if (faces) + mem += MemoryConsumption::memory_consumption (*faces); return mem; }