Fix NULL-reference due to diagnosticInformation being optional
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 7 Sep 2006 12:12:21 +0000 (12:12 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 7 Sep 2006 12:12:21 +0000 (12:12 +0000)
src/gduutil.cpp

index 67a9c6e..210989c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: gduutil.cpp,v 1.5 2006-08-31 12:55:54 marc Exp $
+/* $Id: gduutil.cpp,v 1.6 2006-09-07 12:12:21 adam Exp $
    Copyright (c) 2005-2006, Index Data.
 
    See the LICENSE file for details
@@ -429,7 +429,8 @@ std::ostream& std::operator<<(std::ostream& os,  Z_APDU& zapdu)
                 os << "unknown";
                 break;
             }
-            os << " " << c->diagnosticInformation;
+                       if (c->diagnosticInformation)
+                os << " " << c->diagnosticInformation;
         }
         break;
     case Z_APDU_duplicateDetectionRequest: