diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 6f0df6c..dfd18ba 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1443,6 +1443,10 @@ function comment_user_delete($account) {
 function comment_access($op, $comment) {
   global $user;
 
+  if (!isset($comment->cid) || !is_numeric($comment->cid)) {
+    return FALSE;
+  }
+
   if ($op == 'edit') {
     return ($user->uid && $user->uid == $comment->uid && $comment->status == COMMENT_PUBLISHED && user_access('edit own comments')) || user_access('administer comments');
   }
