[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdecore
From:       Michel Hermier <michel.hermier () wanadoo ! fr>
Date:       2005-12-05 16:38:41
Message-ID: 1133800721.594729.16926.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 485759 by hermier:

Removing possible null reference usage in KSharedPtr::count().

 M  +1 -1      ksharedptr.h  


--- trunk/KDE/kdelibs/kdecore/ksharedptr.h #485758:485759
@@ -124,7 +124,7 @@
      * Returns the number of references.
      * @return the number of references
      */
-    inline int count() const { return ptr->ref; } // for debugging purposes
+    inline int count() const { return ptr ? (int)ptr->ref : 0; } // for debugging purposes
 
     /**
      * Detach the pointer by attaching a new copy of the pointer.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic