sanity checking on request complete
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 1 Mar 2005 21:46:54 +0000 (21:46 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 1 Mar 2005 21:46:54 +0000 (21:46 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@139 9efc2488-bf62-4759-914b-345cdb29e865

src/libstack/osrf_app_session.c

index 59b9015..8acba7e 100644 (file)
@@ -367,7 +367,9 @@ int osrf_app_session_request_complete( osrf_app_session* session, int request_id
        if(session == NULL)
                return 0;
        osrf_app_request* req = _osrf_app_session_get_request( session, request_id );
-       return req->complete;
+       if(req)
+               return req->complete;
+       return 0;
 }
 
 /** Returns the app_request with the given request_id (request_id) */