فهرست منبع

delete action pointer

Remco 9 سال پیش
والد
کامیت
03c06e0974
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  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)