Fix hand/crash in pause when rotating screen
This commit is contained in:
@@ -541,20 +541,18 @@ void NativeMapView::loadExtensions() {
|
||||
void NativeMapView::stop() {
|
||||
mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::stop");
|
||||
|
||||
assert(display != EGL_NO_DISPLAY);
|
||||
assert(context != EGL_NO_CONTEXT);
|
||||
|
||||
map.stop();
|
||||
if ((display != EGL_NO_DISPLAY) && (display != EGL_NO_CONTEXT)) {
|
||||
map.stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void NativeMapView::pause(bool wait_for_pause) {
|
||||
mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::pause %s", (wait_for_pause) ? "true" : "false");
|
||||
|
||||
assert(display != EGL_NO_DISPLAY);
|
||||
assert(context != EGL_NO_CONTEXT);
|
||||
|
||||
map.pause(wait_for_pause);
|
||||
if ((display != EGL_NO_DISPLAY) && (display != EGL_NO_CONTEXT)) {
|
||||
map.pause(wait_for_pause);
|
||||
}
|
||||
}
|
||||
|
||||
void NativeMapView::resume() {
|
||||
|
||||
@@ -429,6 +429,7 @@ void Map::setStyleJSON(std::string newStyleJSON, const std::string &base) {
|
||||
if (!style) {
|
||||
style = std::make_shared<Style>();
|
||||
}
|
||||
|
||||
style->loadJSON((const uint8_t *)styleJSON.c_str());
|
||||
if (!fileSource) {
|
||||
fileSource = std::make_shared<FileSource>(**loop, platform::defaultCacheDatabase());
|
||||
|
||||
Reference in New Issue
Block a user