diff --git a/src/abeautifulsite/SimpleImage.php b/src/abeautifulsite/SimpleImage.php index 1064e9c..290010a 100644 --- a/src/abeautifulsite/SimpleImage.php +++ b/src/abeautifulsite/SimpleImage.php @@ -56,7 +56,7 @@ function __construct($filename = null, $width = null, $height = null, $color = n * */ function __destruct() { - if ($this->image) { + if( get_resource_type($this->image) === 'gd' ) { imagedestroy($this->image); } }