[open-ils-commits] r20094 - trunk/Open-ILS/src/c-apps (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Apr 15 09:55:22 EDT 2011


Author: miker
Date: 2011-04-15 09:55:20 -0400 (Fri, 15 Apr 2011)
New Revision: 20094

Modified:
   trunk/Open-ILS/src/c-apps/oils_sql.c
Log:
Protect pcrud-ish retrieve from an empty result set

Modified: trunk/Open-ILS/src/c-apps/oils_sql.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_sql.c	2011-04-14 21:22:33 UTC (rev 20093)
+++ trunk/Open-ILS/src/c-apps/oils_sql.c	2011-04-15 13:55:20 UTC (rev 20094)
@@ -2358,7 +2358,8 @@
 	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 );



More information about the open-ils-commits mailing list