From: Radosław Korzeniewski Date: Mon, 22 Mar 2021 12:37:57 +0000 (+0100) Subject: metaplugin: Fix issue when got cancel on error. X-Git-Tag: Release-11.3.2~655 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea65946588195e2dbf399afc1ed58b6a2a39801a;p=thirdparty%2Fbacula.git metaplugin: Fix issue when got cancel on error. --- diff --git a/bacula/src/plugins/fd/pluginlib/metaplugin.cpp b/bacula/src/plugins/fd/pluginlib/metaplugin.cpp index cdca3120e..070c9fbcd 100644 --- a/bacula/src/plugins/fd/pluginlib/metaplugin.cpp +++ b/bacula/src/plugins/fd/pluginlib/metaplugin.cpp @@ -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: