aboutsummaryrefslogtreecommitdiff
path: root/lib/image.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/image.php')
-rw-r--r--lib/image.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/image.php b/lib/image.php
index c60eabfc0..a22e1db1c 100644
--- a/lib/image.php
+++ b/lib/image.php
@@ -25,7 +25,9 @@ class TidypicsImage extends ElggFile {
public function delete() {
$album = get_entity($this->container_guid);
- $album->removeImage($this->guid);
+ if ($album) {
+ $album->removeImage($this->guid);
+ }
return parent::delete();
}