summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-07-04 20:33:07 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-07-05 21:04:27 +0300
commitb3b86f9be4187fc82f34188c627c1466c79ad041 (patch)
tree19f70ee6208e3c1642c7820389898d37eb7ed89d
parente579199ac12b58e1099bba5f880a19588c867429 (diff)
downloadqtlocation-mapboxgl-b3b86f9be4187fc82f34188c627c1466c79ad041.tar.gz
[android] Fix hang when calling Timer::start() twice
Calling start() from the callback was making the timer effectively stop.
-rw-r--r--platform/android/src/timer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/platform/android/src/timer.cpp b/platform/android/src/timer.cpp
index 741005df23..81cf0a68b0 100644
--- a/platform/android/src/timer.cpp
+++ b/platform/android/src/timer.cpp
@@ -29,7 +29,6 @@ public:
}
void stop() {
- task = nullptr;
loop->removeRunnable(this);
}
@@ -47,8 +46,8 @@ public:
}
void runTask() override {
- task();
reschedule();
+ task();
}
private: