From: Adam Dickmeiss Date: Wed, 2 May 2007 09:17:48 +0000 (+0000) Subject: Allow NULL otherinfo X-Git-Tag: YAZPP.1.0.3~3 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;ds=sidebyside;h=d5b3fa6deab5b699a950ce7c0d6d5953fc354a6e;p=yazpp-moved-to-github.git Allow NULL otherinfo --- diff --git a/src/yaz-my-client.cpp b/src/yaz-my-client.cpp index 5fc292d..8f9469e 100644 --- a/src/yaz-my-client.cpp +++ b/src/yaz-my-client.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2007, Index Data. * See the file LICENSE for details. * - * $Id: yaz-my-client.cpp,v 1.28 2007-04-16 21:54:23 adam Exp $ + * $Id: yaz-my-client.cpp,v 1.29 2007-05-02 09:17:48 adam Exp $ */ #include @@ -116,7 +116,7 @@ char *MyClient::get_cookie(Z_OtherInformation **otherInfo) Z_OtherInformationUnit *oi = update_otherInformation(otherInfo, 0, yaz_oid_userinfo_cookie, 1, 1); - if (oi->which == Z_OtherInfo_characterInfo) + if (oi && oi->which == Z_OtherInfo_characterInfo) return oi->information.characterInfo; return 0; }