diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-11-01 23:51:15 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-11-01 23:51:15 +0000 |
| commit | aa4de06095cc1f7aba8f7da402d3717d696d5407 (patch) | |
| tree | 2e1892abc880259a95a20247691bade8b44e2a2a /lib/gdi/gpixmap.cpp | |
| parent | d99a6064e796feff188a293c4b7cbc066c3401b1 (diff) | |
| download | enigma2-aa4de06095cc1f7aba8f7da402d3717d696d5407.tar.gz enigma2-aa4de06095cc1f7aba8f7da402d3717d696d5407.zip | |
delete surface when created from gpixmap
Diffstat (limited to 'lib/gdi/gpixmap.cpp')
| -rw-r--r-- | lib/gdi/gpixmap.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gdi/gpixmap.cpp b/lib/gdi/gpixmap.cpp index c3d2cc31..1ecb83d3 100644 --- a/lib/gdi/gpixmap.cpp +++ b/lib/gdi/gpixmap.cpp @@ -538,13 +538,17 @@ DEFINE_REF(gPixmap); gPixmap::~gPixmap() { + if (must_delete_surface) + delete surface; } -gPixmap::gPixmap(gSurface *surface): surface(surface) +gPixmap::gPixmap(gSurface *surface) + :surface(surface), must_delete_surface(false) { } gPixmap::gPixmap(eSize size, int bpp, int accel) + :must_delete_surface(true) { surface = new gSurface(size, bpp, accel); } |
