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

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


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

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

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