Check-in [4e2bd38577]
Not logged in
Overview

SHA1 Hash:4e2bd38577b2c83b7bc502d023a397172f2a1a66
Date: 2008-03-14 12:43:25
User: drh
Comment:Fix an assertion fault: detect when content_get() is called with an invalid artifact id and return 0.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/content.c from [933b11dafd] to [837378bf40].

@@ -165,10 +165,11 @@
   int i;
   static Bag inProcess;
 
   assert( g.repositoryOpen );
   blob_zero(pBlob);
+  if( rid==0 ) return 0;
 
   /* Early out if we know the content is not available */
   if( bag_find(&contentCache.missing, rid) ){
     CONTENT_TRACE(("%*smiss from cache: %d\n",
                     bag_count(&inProcess), "", rid))