From e75ff494217dc7b211c6594a2ae3ab14e32d1f11 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 13 Apr 2016 15:38:13 -0700 Subject: [PATCH] Fix check for the target results being invalid in ResultsNotifier::deliver() m_target_results is no longer actually set to null when the notifier is unregistered, so check the thing which is (i.e. m_realm). --- src/impl/results_notifier.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/impl/results_notifier.cpp b/src/impl/results_notifier.cpp index f53f060d..7f3c7320 100644 --- a/src/impl/results_notifier.cpp +++ b/src/impl/results_notifier.cpp @@ -173,10 +173,10 @@ bool ResultsNotifier::do_deliver(SharedGroup& sg) { auto lock = lock_target(); - // Target results being null here indicates that it was destroyed while we + // Target realm being null here indicates that we were unregistered while we // were in the process of advancing the Realm version and preparing for - // delivery, i.e. it was destroyed from the "wrong" thread - if (!m_target_results) { + // delivery, i.e. the results was destroyed from the "wrong" thread + if (!get_realm()) { return false; }