forked from organicmaps/organicmaps
Merge pull request #2537 from yunikkk/share-editor
[android] Fixed possible crash building route.
This commit is contained in:
commit
7ea424c3ec
1 changed files with 5 additions and 2 deletions
|
@ -711,8 +711,11 @@ Java_com_mapswithme_maps_Framework_nativeBuildRoute(JNIEnv * env, jclass,
|
|||
jdouble startLat, jdouble startLon,
|
||||
jdouble finishLat, jdouble finishLon)
|
||||
{
|
||||
frm()->BuildRoute(MercatorBounds::FromLatLon(startLat, startLon),
|
||||
MercatorBounds::FromLatLon(finishLat, finishLon), 0 /* timeoutSec */);
|
||||
g_framework->PostDrapeTask([startLat, startLon, finishLat, finishLon]()
|
||||
{
|
||||
frm()->BuildRoute(MercatorBounds::FromLatLon(startLat, startLon),
|
||||
MercatorBounds::FromLatLon(finishLat, finishLon), 0 /* timeoutSec */);
|
||||
});
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
|
|
Loading…
Add table
Reference in a new issue