From d04c2fbc1d49c3b265111dae28df06c431d71b3a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 7 Sep 2014 10:55:57 +0200 Subject: [PATCH] QPainter: drop a pointless check There's no need to check for nullptr before invoking delete. Change-Id: Ied751f76f15f390bf86bbba53c14a3e450aa81e8 Reviewed-by: Gunnar Sletta --- src/gui/painting/qpainter.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 09c5e4a991..c4407b7c0d 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -209,9 +209,7 @@ QPainterPrivate::~QPainterPrivate() { delete emulationEngine; qDeleteAll(states); - - if (dummyState) - delete dummyState; + delete dummyState; }