core: Scheduler::cancelEvent allows empty EventId

refs #1176

Change-Id: I80f10ed8026d64b46b4634ced9278f145f54c4a7
diff --git a/daemon/core/scheduler.cpp b/daemon/core/scheduler.cpp
index f9f9996..c72e279 100644
--- a/daemon/core/scheduler.cpp
+++ b/daemon/core/scheduler.cpp
@@ -109,8 +109,8 @@
 void
 Scheduler::cancelEvent(const EventId& eventId)
 {
-  if (!eventId->isValid())
-    return; // event already fired or cancelled
+  if (!static_cast<bool>(eventId) || !eventId->isValid())
+    return; // event empty, already fired, or cancelled
   
   if (static_cast<EventQueue::iterator>(*eventId) != m_scheduledEvent) {
     m_events.erase(*eventId);