Add a new time format: "frames only".
[synfig.git] / synfig-core / trunk / src / synfig / loadcanvas.cpp
index c59075e..200456e 100644 (file)
@@ -6,7 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-**     Copyright (c) 2007 Chris Moore
+**     Copyright (c) 2007, 2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -1694,7 +1694,9 @@ CanvasParser::parse_layer(xmlpp::Element *element,Canvas::Handle canvas)
 
                                String str=     child->get_attribute("use")->get_value();
 
-                               if(layer->get_param(param_name).get_type()==ValueBase::TYPE_CANVAS)
+                               if (str.empty())
+                                       error(child,_("Empty use=\"\" value in <param>"));
+                               else if(layer->get_param(param_name).get_type()==ValueBase::TYPE_CANVAS)
                                {
                                        if(!layer->set_param(param_name,canvas->surefind_canvas(str)))
                                                error((*iter),_("Layer rejected canvas link"));