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)