[open-ils-commits] r20096 - branches/rel_2_0/Open-ILS/src/c-apps (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Apr 15 09:56:47 EDT 2011


Author: miker
Date: 2011-04-15 09:56:45 -0400 (Fri, 15 Apr 2011)
New Revision: 20096

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

Modified: branches/rel_2_0/Open-ILS/src/c-apps/oils_sql.c
===================================================================
--- branches/rel_2_0/Open-ILS/src/c-apps/oils_sql.c	2011-04-15 13:56:08 UTC (rev 20095)
+++ branches/rel_2_0/Open-ILS/src/c-apps/oils_sql.c	2011-04-15 13:56:45 UTC (rev 20096)
@@ -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