From: martin-s Date: Sat, 21 Nov 2009 07:26:04 +0000 (+0000) Subject: Fix:Core:Avoid dragging the map from/to illegal positions X-Git-Tag: navit-0.5.0.5194svn~2414 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b8da40d234ce6b946d6054988cd4d6cd5bb4a98;p=profile%2Fivi%2Fnavit.git Fix:Core:Avoid dragging the map from/to illegal positions git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@2777 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/navit/navit.c b/navit/navit/navit.c index 8f7283d..63f6398 100644 --- a/navit/navit/navit.c +++ b/navit/navit/navit.c @@ -315,14 +315,16 @@ update_transformation(struct transformation *tr, struct point *old, struct point int yaw; double angleo,anglen; - transform_reverse(tr, old, &co); + if (!transform_reverse(tr, old, &co)) + return; if (rot) { angleo=atan2(old->y-rot->y, old->x-rot->x)*180/M_PI; anglen=atan2(new->y-rot->y, new->x-rot->x)*180/M_PI; yaw=transform_get_yaw(tr)+angleo-anglen; transform_set_yaw(tr, yaw % 360); } - transform_reverse(tr, new, &cn); + if (!transform_reverse(tr, new, &cn)) + return; cp=transform_get_center(tr); c.x=cp->x+co.x-cn.x; c.y=cp->y+co.y-cn.y;