summaryrefslogtreecommitdiffstats
path: root/src/draw-context.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/draw-context.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/draw-context.h')
-rw-r--r--src/draw-context.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/draw-context.h b/src/draw-context.h
index a9ad5c118..534c706d6 100644
--- a/src/draw-context.h
+++ b/src/draw-context.h
@@ -22,7 +22,7 @@
/* Freehand context */
-#define SP_DRAW_CONTEXT(obj) ((SPDrawContext*)obj)
+#define SP_DRAW_CONTEXT(obj) (dynamic_cast<SPDrawContext*>((SPEventContext*)obj))
#define SP_IS_DRAW_CONTEXT(obj) (dynamic_cast<const SPDrawContext*>((const SPEventContext*)obj) != NULL)
struct SPDrawAnchor;