From 6a7c48cd01709977d6b40e06b5d2a9b883e6928f Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Wed, 18 Mar 2009 08:17:56 +0000 Subject: [PATCH] missing delete --- Graphics/drawContext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp index e48e8f09eb..3d5b99f275 100644 --- a/Graphics/drawContext.cpp +++ b/Graphics/drawContext.cpp @@ -416,9 +416,11 @@ void drawContext::initProjection(int xpick, int ypick, int wpick, int hpick) } if(!_bgImageSize[0] || !_bgImageSize[1]){ Msg::Error("Could not load valid background image"); + // make sure we don't try to load it again for(int i = 0; i < 3; i++) _bgImage.push_back(0); _bgImageSize[0] = _bgImageSize[1] = 1.; } + if(img) delete img; } double x = CTX::instance()->bgImagePosition[0]; double y = CTX::instance()->bgImagePosition[1]; -- GitLab