From faff8e4c834c645882fc830558edd601fa793238 Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 15 Apr 2011 13:55:20 +0000 Subject: [PATCH] Protect pcrud-ish retrieve from an empty result set git-svn-id: svn://svn.open-ils.org/ILS/trunk@20094 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/c-apps/oils_sql.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/c-apps/oils_sql.c b/Open-ILS/src/c-apps/oils_sql.c index b64e22e2a1..3f8157db34 100644 --- a/Open-ILS/src/c-apps/oils_sql.c +++ b/Open-ILS/src/c-apps/oils_sql.c @@ -2358,7 +2358,8 @@ int doRetrieve( osrfMethodContext* ctx ) { jsonObjectFree( list ); if( enforce_pcrud ) { - if(!verifyObjectPCRUD( ctx, obj, 1 )) { + // no result, skip this entirely + if(NULL != obj && !verifyObjectPCRUD( ctx, obj, 1 )) { jsonObjectFree( obj ); growing_buffer* msg = buffer_init( 128 ); -- 2.11.0