From 1fac4911ec96973359db4f4aa5dfdf8f3e0489d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Mon, 30 Jun 2014 02:05:52 +0200 Subject: [PATCH] Delete m_background pixmap in SignalDrawer destructor --- signaldrawer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/signaldrawer.cpp b/signaldrawer.cpp index be52023..aea8ed3 100644 --- a/signaldrawer.cpp +++ b/signaldrawer.cpp @@ -319,11 +319,10 @@ bool SignalDrawer::renderGraph(QPixmap* const target) void SignalDrawer::renderFresh(QPixmap* const fresh) { - if (m_pixmap) - delete m_pixmap; + delete m_pixmap; m_pixmap = fresh; - if (m_background) - delete m_background; + + delete m_background; m_background = new QPixmap(*m_pixmap); } @@ -486,4 +485,5 @@ void SignalDrawer::setNewRelativeConstraints(const double fromX, const double fr SignalDrawer::~SignalDrawer() { delete m_pixmap; + delete m_background; } -- 2.43.5