Assert that notify gets a response

This commit is contained in:
John Firebaugh
2015-04-16 17:55:44 -07:00
parent 2a8ddc9f27
commit ea73c99faa

View File

@@ -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);
}
}