]> https://gitweb.dealii.org/ - dealii.git/commitdiff
all subscribes test for null pointer
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 4 Sep 1998 12:23:42 +0000 (12:23 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 4 Sep 1998 12:23:42 +0000 (12:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@562 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/smartpointer.h

index 53c9630cdffe258b24f9b3061b06a17febcfac13..15eb84f81c3b2d5681f297fe945fe1a304b1e75b 100644 (file)
@@ -44,7 +44,8 @@ class SmartPointer
     SmartPointer(T* tt) :
                    t(tt) 
       {
-       t->subscribe();
+       if (t)
+         t->subscribe();
       }
 
                                   /**

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.