Procházet zdrojové kódy

delete action pointer

Remco před 9 roky
rodič
revize
03c06e0974
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  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)