From b1b69140a15a1b73f5181efdbdf24c5ece24b3ef Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 13 Aug 2007 13:52:16 +0000 Subject: [PATCH] Don't delete the subpictures in the ServerPicture destructor. They are kept in a list by ServerApp, and deleted by its destructor. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21924 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/ServerPicture.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/servers/app/ServerPicture.cpp b/src/servers/app/ServerPicture.cpp index 722f5bf5fd..00b417035f 100644 --- a/src/servers/app/ServerPicture.cpp +++ b/src/servers/app/ServerPicture.cpp @@ -778,11 +778,9 @@ ServerPicture::~ServerPicture() delete fData; gTokenSpace.RemoveToken(fToken); - if (fPictures != NULL) { - for (int32 i = fPictures->CountItems() - 1; i >= 0; i--) - delete static_cast(fPictures->ItemAtFast(i)); - delete fPictures; - } + // We don't delete the subpictures themselves, the ServerApp keeps + // them in a list and will delete them on quit. + delete fPictures; }