From 0c35dab0ba366f85b40ef1795125521f1df8c264 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 28 Mar 2014 00:39:12 +0300 Subject: simplify variables cleanup. --- src/text.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/text.cpp') diff --git a/src/text.cpp b/src/text.cpp index bf75e80d6..542dc60d9 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -32,6 +32,8 @@ #include "resources/image.h" +#include "utils/delete2.h" + #include "debug.h" int Text::mInstances = 0; @@ -99,8 +101,7 @@ Text::~Text() textManager->removeText(this); if (--mInstances == 0) { - delete textManager; - textManager = nullptr; + delete2(textManager); for (int f = 0; f < 9; f ++) { if (mBubble.grid[f]) -- cgit v1.2.3-70-g09d2