]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
metaplugin: Fix issue when got cancel on error.
authorRadosław Korzeniewski <radoslaw@korzeniewski.net>
Mon, 22 Mar 2021 12:37:57 +0000 (13:37 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:00 +0000 (09:03 +0100)
bacula/src/plugins/fd/pluginlib/metaplugin.cpp

index cdca3120e5347526f05808dc2e5961aae45a9cac..070c9fbcd819cb060d643620655a9fa4a0af1be3 100644 (file)
@@ -1264,8 +1264,11 @@ bRC METAPLUGIN::handlePluginEvent(bpContext *ctx, bEvent *event, void *value)
          TODO: PETITION: Our plugin (RHV WhiteBearSolutions) search the packet E CANCEL.
          TODO: If you modify this behaviour, please you notify us.
       */
-      bsscanf("CANCEL", "%s", tmp.c_str());
-      backend.ctx->signal_error(ctx, tmp.c_str());
+      if (backend.ctx != NULL) {
+         // XXX: something is going different then designed here, as backend.ctx is NULL
+         bsscanf("CANCEL", "%s", tmp.c_str());
+         backend.ctx->signal_error(ctx, tmp.c_str());
+      }
       break;
 
    default: