Author: Carlos Lopez <[email protected]>
Date:   Sun Mar 13 22:04:29 2011 +0100

Avoid crash when reversed manipulation for certain converted types parameters

---

 .../src/synfigapp/actions/valuedescset.cpp         |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/synfig-studio/src/synfigapp/actions/valuedescset.cpp 
b/synfig-studio/src/synfigapp/actions/valuedescset.cpp
index 345c9e3..480a8b0 100644
--- a/synfig-studio/src/synfigapp/actions/valuedescset.cpp
+++ b/synfig-studio/src/synfigapp/actions/valuedescset.cpp
@@ -337,10 +337,10 @@ Action::ValueDescSet::prepare()
                ValueBase new_value;
                if (value.get_type() == ValueBase::TYPE_ANGLE)
                        new_value = scale_value_node->get_inverse(time, 
value.get(Angle()));
-               else if (value.get_type() == ValueBase::TYPE_REAL)
-                       throw Error(_("Inverse manipulation of real scale 
values not implemented in core."));
-               else
+               else if(value.get_type() == ValueBase::TYPE_VECTOR)
                        new_value = scale_value_node->get_inverse(time, 
value.get(Vector()));
+               else
+                       throw Error(_("Inverse manipulation of %s scale values 
not implemented in core."), value.type_name().c_str());
                Action::Handle action(Action::create("ValueDescSet"));
                if(!action)
                        throw Error(_("Unable to find action ValueDescSet 
(bug)"));
@@ -360,10 +360,8 @@ Action::ValueDescSet::prepare()
                ValueBase new_value;
                if (value.get_type() == ValueBase::TYPE_ANGLE)
                        new_value = range_value_node->get_inverse(time, 
value.get(Angle()));
-               else if (value.get_type() == ValueBase::TYPE_REAL)
-                       throw Error(_("Inverse manipulation of real range 
values not implemented in core."));
                else
-                       new_value = range_value_node->get_inverse(time, 
value.get(Vector()));
+                       throw Error(_("Inverse manipulation of %s range values 
not implemented in core."), value.type_name().c_str());
                Action::Handle action(Action::create("ValueDescSet"));
                if(!action)
                        throw Error(_("Unable to find action ValueDescSet 
(bug)"));


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to