]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/match_bsr.c
kes If operator has rewind tape, print warning, release tape and
[bacula/bacula] / bacula / src / stored / match_bsr.c
index e8dbdc2fdd2e33616801bfe89a144f17ddb0265c..2552eee607b3ae424282c1e445c59eeea7036d43 100644 (file)
@@ -193,7 +193,11 @@ BSR *find_next_bsr(BSR *root_bsr, DEVICE *dev)
    BSR *found_bsr = NULL;
 
    /* Do tape/disk seeking only if CAP_POSITIONBLOCKS is on */
-   if (!root_bsr || !root_bsr->use_positioning ||
+   if (!root_bsr) {
+      Dmsg0(dbglevel, "NULL root bsr pointer passed to find_next_bsr.\n");
+      return NULL;
+   }
+   if (!root_bsr->use_positioning ||
        !root_bsr->reposition || !dev->has_cap(CAP_POSITIONBLOCKS)) {
       Dmsg2(dbglevel, "No nxt_bsr use_pos=%d repos=%d\n", root_bsr->use_positioning, root_bsr->reposition);
       return NULL;