diff --git a/modules/commons/commons_events/includes/commons_events.theme.inc b/modules/commons/commons_events/includes/commons_events.theme.inc
index 22a52b853c9dbab3d1525a867b9626722bb94373..e72e73d65b8a0f6175229b6556e94bc2a4fc00f5 100644
--- a/modules/commons/commons_events/includes/commons_events.theme.inc
+++ b/modules/commons/commons_events/includes/commons_events.theme.inc
@@ -10,6 +10,10 @@
 function theme_commons_events_attending_event($variables = array()) {
   global $user;
   $event = $variables['event'];
+  if (!$event->nid) {
+    return '';
+  }
+
   $attendee_count = isset($variables['attendee_count']) ? $variables['attendee_count'] : 0;
 
   $registration_type = registration_get_entity_registration_type('node', $event);
