hermet pushed a commit to branch evas-1.7.

commit e658c349f14b76be4cedea3f44a0fd7ca479d284
Author: ChunEon Park <[email protected]>
Date:   Sat Apr 13 19:03:15 2013 +0900

    evas - Don't be crashed even if the map image size is 0.
---
 ChangeLog                 | 4 ++++
 NEWS                      | 1 +
 src/lib/canvas/evas_map.c | 4 ++--
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0093cf6..116ab78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1263,3 +1263,7 @@
 2013-04-09  Rafael Antognolli
 
         * 1.7.6.1 release
+
+2013-04-13  ChunEon Park
+
+        * Evas: Don't be crashed even if the map image size is 0.
diff --git a/NEWS b/NEWS
index 71ac35f..5da32d6 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Fixes:
    * Fix over redrawing of Evas_Map when applied on smart object.
    * Evas font: Fix a bug with cluster size calculation with texts ending
    with ligatures.
+   * Evas map: don't be crashed even if image size is 0.
 
 Evas 1.7.6
 
diff --git a/src/lib/canvas/evas_map.c b/src/lib/canvas/evas_map.c
index b76ea22..ce04f63 100644
--- a/src/lib/canvas/evas_map.c
+++ b/src/lib/canvas/evas_map.c
@@ -1114,9 +1114,9 @@ evas_object_map_update(Evas_Object *obj,
         pt->fx = p->px;
         pt->fy = p->py;
         pt->fz = p->z;
-        if (uvw == 0) pt->u = 0;
+        if ((uvw == 0) || (imagew == 0)) pt->u = 0;
         else pt->u = ((lround(p->u) * imagew) / uvw) * FP1;
-        if (uvh == 0) pt->v = 0;
+        if ((uvh == 0) || (imageh == 0)) pt->v = 0;
         else pt->v = ((lround(p->v) * imageh) / uvh) * FP1;
         if      (pt->u < 0) pt->u = 0;
         else if (pt->u > (imagew * FP1)) pt->u = (imagew * FP1);

-- 

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

Reply via email to