diff --git a/src/Intervention/Image/Gd/Commands/ResetCommand.php b/src/Intervention/Image/Gd/Commands/ResetCommand.php index 12c41bf6..16f1aef0 100644 --- a/src/Intervention/Image/Gd/Commands/ResetCommand.php +++ b/src/Intervention/Image/Gd/Commands/ResetCommand.php @@ -16,8 +16,9 @@ class ResetCommand extends AbstractCommand public function execute($image) { $backupName = $this->argument(0)->value(); - - if (is_resource($backup = $image->getBackup($backupName))) { + $backup = $image->getBackup($backupName) + + if (is_resource($backup) || $backup instanceof \GdImage) { // destroy current resource imagedestroy($image->getCore());