From: Samuel Just Date: Tue, 18 Jun 2013 22:14:17 +0000 (-0700) Subject: ObjectStore: only register non-null contexts X-Git-Tag: v0.67-rc1~138^2~1^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0e339cea50b9cce2f2c5556f02bc6f5691f6d2b;p=ceph.git ObjectStore: only register non-null contexts Signed-off-by: Samuel Just --- diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index 3bcc6e90f4c..7310d53b0ee 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -178,15 +178,19 @@ public: tolerate_collection_add_enoent = true; } void register_on_applied(Context *c) { + if (!c) return; on_applied.push_back(c); } void register_on_commit(Context *c) { + if (!c) return; on_commit.push_back(c); } void register_on_applied_sync(Context *c) { + if (!c) return; on_applied_sync.push_back(c); } void register_on_complete(Context *c) { + if (!c) return; RunOnDeleteRef _complete(new RunOnDelete(c)); register_on_applied(new ContainerContext(_complete)); register_on_commit(new ContainerContext(_complete));