diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-04-16 17:55:44 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-04-28 09:16:25 -0400 |
commit | ea73c99faa7f46c2c958644fd1300d1cf88701b0 (patch) | |
tree | bf84d515096b0ebf3bca712e3e5f6c68c78789b3 /src/mbgl | |
parent | 2a8ddc9f27faded12c3013283123427af607f02e (diff) | |
download | qtlocation-mapboxgl-ea73c99faa7f46c2c958644fd1300d1cf88701b0.tar.gz |
Assert that notify gets a response
Diffstat (limited to 'src/mbgl')
-rw-r--r-- | src/mbgl/storage/shared_request_base.hpp | 9 |
1 files changed, 4 insertions, 5 deletions
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<const Response> 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); } } |