summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/filter/igif/gifread.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 4cd29943eaf4..3789ebbc8093 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -49,7 +49,6 @@ class SvStream;
class GIFReader : public GraphicReader
{
- Graphic aImGraphic;
Animation aAnimation;
Bitmap aBmp8;
Bitmap aBmp1;
@@ -103,10 +102,9 @@ class GIFReader : public GraphicReader
public:
ReadState ReadGIF( Graphic& rGraphic );
- const Graphic& GetIntermediateGraphic();
+ Graphic GetIntermediateGraphic();
explicit GIFReader( SvStream& rStm );
- virtual ~GIFReader() override;
};
GIFReader::GIFReader( SvStream& rStm )
@@ -145,11 +143,6 @@ GIFReader::GIFReader( SvStream& rStm )
ClearImageExtensions();
}
-GIFReader::~GIFReader()
-{
- aImGraphic.SetContext( nullptr );
-}
-
void GIFReader::ClearImageExtensions()
{
nGCDisposalMethod = 0;
@@ -651,8 +644,10 @@ void GIFReader::CreateNewBitmaps()
}
}
-const Graphic& GIFReader::GetIntermediateGraphic()
+Graphic GIFReader::GetIntermediateGraphic()
{
+ Graphic aImGraphic;
+
// only create intermediate graphic, if data is available
// but graphic still not completely read
if ( bImGraphicReady && !aAnimation.Count() )