From 1297ae2b76ca48e433de6e54922945880251ab3c Mon Sep 17 00:00:00 2001 From: Le Philousophe Date: Sun, 9 Jun 2019 12:52:20 +0200 Subject: GRAPHICS: Fix ManagedSurface::copyFrom memory handling When calling ManagedSurface::copyFrom, _disposeAfterUse should be set to YES because inner surface frees up old pixels array and creates a new one. --- graphics/managed_surface.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'graphics/managed_surface.h') diff --git a/graphics/managed_surface.h b/graphics/managed_surface.h index a11d05c557..c143222bbc 100644 --- a/graphics/managed_surface.h +++ b/graphics/managed_surface.h @@ -307,10 +307,7 @@ public: * Copy the data from another Surface, reinitializing the * surface to match the dimensions of the passed surface */ - void copyFrom(const ManagedSurface &surf) { - clearDirtyRects(); - _innerSurface.copyFrom(surf._innerSurface); - } + void copyFrom(const ManagedSurface &surf); /** * Draw a line. -- cgit v1.2.3