summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d85ed54)
raw | patch | inline | side by side (parent: d85ed54)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Fri, 1 May 2009 12:19:56 +0000 (12:19 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Fri, 1 May 2009 12:19:56 +0000 (12:19 +0000) |
src/event-context.cpp | patch | blob | history |
diff --git a/src/event-context.cpp b/src/event-context.cpp
index 88b17e0011b942aea62c47d84b2e47094a54d54e..2bbdcee0703eb90e824e0f7cfcf8c7ef3c37c7bb 100644 (file)
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
sp_event_context_virtual_root_handler(ec, dse->getEvent());
break;
case DelayedSnapEvent::EVENTCONTEXT_ITEM_HANDLER:
- g_assert(dse->getItem() != NULL);
- sp_event_context_virtual_item_handler(ec, dse->getItem(), dse->getEvent());
+ {
+ SPItem* item = NULL;
+ item = dse->getItem();
+ if (item && SP_IS_ITEM(item)) {
+ sp_event_context_virtual_item_handler(ec, item, dse->getEvent());
+ }
+ }
break;
case DelayedSnapEvent::KNOT_HANDLER:
- g_assert(dse->getKnot() != NULL);
- sp_knot_handler_request_position(dse->getEvent(), dse->getKnot());
+ {
+ SPKnot* knot = dse->getKnot();
+ if (knot && SP_IS_KNOT(knot)) {
+ sp_knot_handler_request_position(dse->getEvent(), knot);
+ }
+ }
break;
default:
g_warning("Origin of snap-delay event has not been defined!;");