From ea73c99faa7f46c2c958644fd1300d1cf88701b0 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 16 Apr 2015 17:55:44 -0700 Subject: Assert that notify gets a response --- src/mbgl/storage/shared_request_base.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mbgl/storage') diff --git a/src/mbgl/storage/shared_request_base.hpp b/src/mbgl/storage/shared_request_base.hpp index 3cd33b2ed9..3fc0c5bfe3 100644 --- a/src/mbgl/storage/shared_request_base.hpp +++ b/src/mbgl/storage/shared_request_base.hpp @@ -34,14 +34,13 @@ public: void notify(std::shared_ptr response, FileCache::Hint hint) { MBGL_VERIFY_THREAD(tid); + assert(response); source.notify(this, response, hint); - if (response) { - // Notify all observers. - for (auto req : observers) { - req->notify(response); - } + // Notify all observers. + for (auto req : observers) { + req->notify(response); } } -- cgit v1.2.1