[aseprite] 30/64: Fix memory leak on RecentListBox

Tobias Hansen thansen at moszumanska.debian.org
Tue Jun 21 14:43:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit 035916dce379b1a2e47703ad05d9313b24657042
Author: David Capello <davidcapello at gmail.com>
Date:   Wed May 11 13:21:55 2016 -0300

    Fix memory leak on RecentListBox
---
 src/app/ui/recent_listbox.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/app/ui/recent_listbox.cpp b/src/app/ui/recent_listbox.cpp
index 91fb246..d511d25 100644
--- a/src/app/ui/recent_listbox.cpp
+++ b/src/app/ui/recent_listbox.cpp
@@ -98,8 +98,11 @@ RecentListBox::RecentListBox()
 
 void RecentListBox::rebuildList()
 {
-  while (lastChild())
-    removeChild(lastChild());
+  while (lastChild()) {
+    auto child = lastChild();
+    removeChild(child);
+    child->deferDelete();
+  }
 
   onRebuildList();
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list