From 244fab3a3215d9c76641b550f135d556631f6916 Mon Sep 17 00:00:00 2001 From: Evgeniy Polyakov Date: Mon, 24 Sep 2012 22:49:49 +0400 Subject: [PATCH] Do not try to run command if srw was not initialized --- srw/srw.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/srw/srw.cpp b/srw/srw.cpp index 2f16879..995506b 100644 --- a/srw/srw.cpp +++ b/srw/srw.cpp @@ -486,6 +486,9 @@ int dnet_cmd_exec_raw(struct dnet_net_state *st, struct dnet_cmd *cmd, struct sp struct dnet_node *n = st->n; srw *s = (srw *)n->srw; + if (!s) + return -ENOTSUP; + try { return s->process(st, cmd, header); } catch (const std::exception &e) { -- 2.11.4.GIT