From 9ce9764c8a9119a0c2b02c0c4ad43c3d18b08c9f Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Wed, 11 Mar 2015 20:46:30 -0400 Subject: [PATCH] Fixes #64 --- src/abeautifulsite/SimpleImage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } }