From: Adam Dickmeiss Date: Wed, 15 Dec 2004 11:42:27 +0000 (+0000) Subject: Fix NULL pointer reference (occurred when close PDU was received) X-Git-Tag: YAZPROXY.0.9~14 X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=commitdiff_plain;h=28fa74ed8cbc47560a5a4c90b2d3447867625d25;hp=2bab0500e690612c044b1d9f87a0f03bc1640743 Fix NULL pointer reference (occurred when close PDU was received) --- diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index 935e453..5d7bded 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -1,4 +1,4 @@ -/* $Id: yaz-proxy.cpp,v 1.14 2004-12-13 20:52:33 adam Exp $ +/* $Id: yaz-proxy.cpp,v 1.15 2004-12-15 11:42:27 adam Exp $ Copyright (c) 1998-2004, Index Data. This file is part of the yaz-proxy. @@ -2391,7 +2391,7 @@ void Yaz_Proxy::handle_incoming_Z_PDU(Z_APDU *apdu) // delete other info construct completely if 0 elements get_otherInfoAPDU(apdu, &oi); - if (*oi && (*oi)->num_elements == 0) + if (oi && *oi && (*oi)->num_elements == 0) *oi = 0; if (apdu->which == Z_APDU_presentRequest &&