From 3c27a0288d12eef6a6dcd94d1598c50f734e98fe Mon Sep 17 00:00:00 2001 From: Bruno Dilly Date: Mon, 13 Aug 2012 22:24:36 +0000 Subject: [PATCH] EPhysics: fix updating bodies with evas object without geometry If a evas object associated to a body don't have w or h, don't try to apply map / rotation on it. SVN revision: 75229 --- legacy/ephysics/src/lib/ephysics_body.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/legacy/ephysics/src/lib/ephysics_body.cpp b/legacy/ephysics/src/lib/ephysics_body.cpp index 3eb358eb02..fff2fc378c 100644 --- a/legacy/ephysics/src/lib/ephysics_body.cpp +++ b/legacy/ephysics/src/lib/ephysics_body.cpp @@ -341,6 +341,13 @@ _ephysics_body_evas_object_default_update(EPhysics_Body *body) evas_object_move(body->evas_obj, x, y); + if ((!w) || (!h)) + { + DBG("Evas object with no geometry: %p, w=%i h=%i", body->evas_obj, + w, h); + return; + } + rot = - trans.getRotation().getAngle() * RAD_TO_DEG * trans.getRotation().getAxis().getZ();