Explorar o código

delete action pointer

Remco %!s(int64=9) %!d(string=hai) anos
pai
achega
03c06e0974
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      Button.cpp

+ 2 - 0
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)