]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Do not dereference pointers unless we know that they are non-NULL. 3190/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 4 Oct 2016 20:12:30 +0000 (14:12 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 4 Oct 2016 20:12:30 +0000 (14:12 -0600)
source/grid/tria.cc

index e881105112de1734bcff641ef9916f0f107e309d..34b530d6affba21edcec608a770f21dc7c121051 100644 (file)
@@ -13539,7 +13539,8 @@ Triangulation<dim, spacedim>::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;
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.