Fix a call on potentially undefined parent in Gallery Album. Fixes bug #11289.

This commit is contained in:
Colin Kuskie 2009-12-03 22:46:33 -08:00
parent 8574b68586
commit 9476878b5e
3 changed files with 17 additions and 7 deletions

View file

@ -311,8 +311,7 @@ sub canEdit {
}
else {
return 1 if $userId eq $self->get("ownerUserId");
return $gallery->canEdit($userId);
return $gallery && $gallery->canEdit($userId);
}
}