From 2aa36663e186c0e7a13e806e29e98e40c6a41484 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 27 May 2013 00:04:22 +0200 Subject: [PATCH] CTimerList: prevent memory leak --- src/gui/timerlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 3553fe48d..2c9e0276e 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -857,8 +857,8 @@ void CTimerList::paintItem(int pos) void CTimerList::paintHead() { - CComponentsHeader *header = new CComponentsHeader(x, y, width, theight, LOCALE_TIMERLIST_NAME, NEUTRINO_ICON_TIMER); - header->paint(); + CComponentsHeader header(x, y, width, theight, LOCALE_TIMERLIST_NAME, NEUTRINO_ICON_TIMER); + header.paint(); } const struct button_label TimerListButtons[5] =