summaryrefslogtreecommitdiffstats
path: root/src/sp-shape.h
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-09-15 00:43:49 +0000
committerMarkus Engel <markus.engel@tum.de>2013-09-15 00:43:49 +0000
commit5cf6efefbfd06d723973b6517b442f0ee64416b7 (patch)
treeda00f2c24881267859ab46843398cb10d8fe2ff2 /src/sp-shape.h
parentModified SP_IS_ macros. (diff)
downloadinkscape-5cf6efefbfd06d723973b6517b442f0ee64416b7.tar.gz
inkscape-5cf6efefbfd06d723973b6517b442f0ee64416b7.zip
Added runtime check in SP_-cast macros.
(bzr r11608.1.123)
Diffstat (limited to 'src/sp-shape.h')
-rw-r--r--src/sp-shape.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sp-shape.h b/src/sp-shape.h
index 806615606..bc51f3d45 100644
--- a/src/sp-shape.h
+++ b/src/sp-shape.h
@@ -22,7 +22,7 @@
#include <stddef.h>
#include <sigc++/connection.h>
-#define SP_SHAPE(obj) ((SPShape*)obj)
+#define SP_SHAPE(obj) (dynamic_cast<SPShape*>((SPObject*)obj))
#define SP_IS_SHAPE(obj) (dynamic_cast<const SPShape*>((SPObject*)obj) != NULL)
#define SP_SHAPE_WRITE_PATH (1 << 2)