From 03c06e0974abb1b8d2001869f07f1dfe88f6517a Mon Sep 17 00:00:00 2001 From: Remco Date: Mon, 20 Jun 2016 13:44:02 +0200 Subject: [PATCH] delete action pointer --- Button.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Button.cpp b/Button.cpp index c53e964..a3ec170 100644 --- a/Button.cpp +++ b/Button.cpp @@ -22,6 +22,8 @@ Button::Button(const std::string & text, Vec2f position, float width, float heig Button::~Button() { + if (action != nullptr) + delete action; } void Button::draw(void)