From 6a3898d9c1d0791c47aca9ebcc2288769374122f Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 19 Mar 2006 08:27:28 +0000 Subject: [PATCH] Put a condition around imagedestroy() in set_scale() so we don't get warnings --- graph_pie.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/graph_pie.php b/graph_pie.php index 9a82331..6114aec 100644 --- a/graph_pie.php +++ b/graph_pie.php @@ -220,7 +220,10 @@ class Graph_Pie $this->dimensions['height'] /= $scale; } - imagedestroy($this->image); + if (!is_null($this->image)) + { + imagedestroy($this->image); + } $this->image = imagecreate($this->dimensions['width'], $this->dimensions['height']); } -- 2.43.5