From 7a6f1a383a61fe090c6d706d01b4bbf7725c39da Mon Sep 17 00:00:00 2001 From: Frank Zago Date: Sat, 31 Oct 2009 16:43:12 +0000 Subject: [PATCH] Free now uninitialized std::map in CPlayerInterface::~CPlayerInterface. --- client/CPlayerInterface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index 1a752952c..8991820a4 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -111,8 +111,11 @@ CPlayerInterface::~CPlayerInterface() for(std::map::iterator i=graphics->heroWins.begin(); i!= graphics->heroWins.end(); i++) SDL_FreeSurface(i->second); + graphics->heroWins.clear(); + for(std::map::iterator i=graphics->townWins.begin(); i!= graphics->townWins.end(); i++) SDL_FreeSurface(i->second); + graphics->townWins.clear(); } void CPlayerInterface::init(ICallback * CB) {