From 1c60ce25ee2fe15cc4bfa0649853bf6a0b95c14d Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 30 Sep 2012 18:40:10 +0100 Subject: [PATCH] Delete notification before removing from vector --- src/game/GameModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 15dfad1d9..05dc7fb8a 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -849,8 +849,8 @@ void GameModel::RemoveNotification(Notification * notification) { if(*iter == notification) { - notifications.erase(iter); delete *iter; + notifications.erase(iter); break; } }