[ios] Assert that defaults change is on main thread

Cherry-picked from e7ddaa9285.
This commit is contained in:
Minh Nguyễn
2016-04-19 08:02:57 -07:00
committed by Minh Nguyễn
parent e5fa7093da
commit 302f69fded

View File

@@ -236,6 +236,7 @@ const NSTimeInterval MGLFlushInterval = 180;
}
- (void)userDefaultsDidChange:(NSNotification *)notification {
MGLAssertIsMainThread();
[self pauseOrResumeMetricsCollectionIfRequired];
}