From 5ceb89e41d788ae9ed18b972cedbbfcb923ddc27 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Sat, 20 Apr 2013 20:34:35 -0400 Subject: Throw better error when attribute isn't available (bzr r12288) --- src/xml/repr-util.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/xml') diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp index 6ea20b87a..8c8425de0 100644 --- a/src/xml/repr-util.cpp +++ b/src/xml/repr-util.cpp @@ -524,6 +524,8 @@ unsigned int sp_repr_get_point(Inkscape::XML::Node *repr, gchar const *key, Geom gchar const *v = repr->attribute(key); + g_return_val_if_fail(v != NULL, FALSE); + gchar ** strarray = g_strsplit(v, ",", 2); if (strarray && strarray[0] && strarray[1]) { -- cgit v1.2.3