diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2014-06-17 11:01:22 +0200 |
---|---|---|
committer | Stefan Schmidt <s.schmidt@samsung.com> | 2014-06-17 11:01:22 +0200 |
commit | 1c530b6c0c796fb991c2641f0ed0add45a8a49da (patch) | |
tree | ce96b55d3cb9a4410a798b2db318ad025a8682e7 | |
parent | 88caf37e1b4fc6fc12b366cfab9c1c92f5500c50 (diff) | |
download | elementary-1c530b6c0c796fb991c2641f0ed0add45a8a49da.tar.gz |
elm_map: Avoid unlikely division by zero.
The division by zeor could happen when zoom_cnt is zeor OR when region_cnt
is zero. No need for both cases. In the curent implementation this is
impossible as both are hard coded defines. But code changes so we should
handle this.
CID: 1216619
-rw-r--r-- | src/lib/elm_map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c index de03088e5..d6f3a48a4 100644 --- a/src/lib/elm_map.c +++ b/src/lib/elm_map.c @@ -1224,7 +1224,7 @@ _zoom_bring_with_animation(Elm_Map_Data *sd, { double tlon, tlat; Evas_Coord vx, vy, vw, vh; - if ((zoom_cnt == 0) && (region_cnt == 0)) return; + if ((zoom_cnt == 0) || (region_cnt == 0)) return; sd->ani.zoom_cnt = zoom_cnt; sd->ani.zoom = sd->zoom; |