From 1a839d74a8eabbbbac91c3527d31a95374d14e9d Mon Sep 17 00:00:00 2001
From: Timur Pocheptsov <Timur.Pocheptsov@cern.ch>
Date: Tue, 25 Mar 2014 19:39:59 +0100
Subject: [PATCH] Delete a canvas if the graphics back-end is not TGCocoa.

---
 tutorials/cocoa/radialgradients.C | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tutorials/cocoa/radialgradients.C b/tutorials/cocoa/radialgradients.C
index d69e8b01daa..710ed40f96d 100644
--- a/tutorials/cocoa/radialgradients.C
+++ b/tutorials/cocoa/radialgradients.C
@@ -1,5 +1,5 @@
 //This tutorial demonstrates how to use radial gradients,
-//custom colors, transparency, transparent pads.
+//custom colors, transparency.
 //Requires ROOT built for OS X with --enable-cocoa.
 
 #include <iostream>
@@ -90,6 +90,7 @@ void radialgradients()
    if (gVirtualX && !gVirtualX->InheritsFrom("TGCocoa")) {
       ::Error("radialgradients",
               "this demo requires OS X and ROOT built with --enable-cocoa");
+      delete cnv;
       return;
    }
 
-- 
GitLab