[ios, osx] Fixed crash interacting with MGLOfflineTask
Added a missing conditional to the invalidation checking macro that I factored out at the last minute.
This commit is contained in:
committed by
Minh Nguyễn
parent
8824237e2d
commit
e218728f3a
@@ -8,11 +8,15 @@
|
||||
#include <mbgl/util/string.hpp>
|
||||
|
||||
#define MGLAssertOfflineTaskIsValid() \
|
||||
[NSException raise:@"Invalid offline task" \
|
||||
format: \
|
||||
@"-[MGLOfflineStorage removeTask:withCompletionHandler:] has been called " \
|
||||
@"on this instance of MGLOfflineTask, rendering it invalid. It is an " \
|
||||
@"error to send any message to this task."]
|
||||
do { \
|
||||
if (_state == MGLOfflineTaskStateInvalid) { \
|
||||
[NSException raise:@"Invalid offline task" \
|
||||
format: \
|
||||
@"-[MGLOfflineStorage removeTask:withCompletionHandler:] has been called " \
|
||||
@"on this instance of MGLOfflineTask, rendering it invalid. It is an " \
|
||||
@"error to send any message to this task."]; \
|
||||
} \
|
||||
} while (NO);
|
||||
|
||||
class MBGLOfflineRegionObserver;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user