--- a/og_notifications.inc      2013-03-18 11:05:30.793652653 +0200
+++ b/og_notifications.inc      2013-03-18 11:08:46.557853129 +0200
@@ -27,9 +27,14 @@ class Og_Notifications_Subscription exte
       $gid = $node->nid;
     }
     elseif (og_get_group_type('node', $node->type, 'group content')) {
-      $gid = array_pop(array_pop(og_get_entity_groups('node', $node)));
+      $node_groups = og_get_entity_groups('node', $node);
+      if (isset($node_groups)) {
+        $gid = array_pop(array_pop($node_groups));
+      }
+    }
+    if (isset($gid)) {
+      $this->get_field('node:gid')->set_value($gid);
     }
-    $this->get_field('node:gid')->set_value($gid);
     return $this;
   }
