Merge pull request #2537 from yunikkk/share-editor

[android] Fixed possible crash building route.
This commit is contained in:
Alexander Marchuk 2016-03-25 18:51:20 +03:00
commit 7ea424c3ec

View file

@ -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