Fix dumping empty suffix tree
authorteodor <teodor>
Sat, 14 Feb 2009 12:12:46 +0000 (12:12 +0000)
committerteodor <teodor>
Sat, 14 Feb 2009 12:12:46 +0000 (12:12 +0000)
sfxstr.c

index 6bf215d..d65bf7c 100644 (file)
--- a/sfxstr.c
+++ b/sfxstr.c
@@ -1126,8 +1126,9 @@ SFSWriteDump(SFSTree *info, char *filename, void *extradata, u_int32_t extrasize
 
                wp.info = info;
                wp.offset = 0;
-               
-               writeNode(&wp, fd, info->node, extrasize);
+       
+               if ( info->node )
+                       writeNode(&wp, fd, info->node, extrasize);
        }
        
        flock(fd, LOCK_UN);