summaryrefslogtreecommitdiff
path: root/vcl/source/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-31 15:06:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-31 15:08:51 +0100
commitdaf1578d752531e2b48d183531d9a4a7cedfc37e (patch)
treea623784a36da015bd6989f4896fdcc5fd27e1713 /vcl/source/filter
parentca77ec422ea617c84400370b082e71437e4590cc (diff)
check stream status
Change-Id: I27bb289288d319a93201e9c3d703114924ca258c
Diffstat (limited to 'vcl/source/filter')
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index a379d8bd9bc4..9e446c06cfb3 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -650,7 +650,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pAcc = aBmp.AcquireWriteAccess();
if ( pAcc )
{
- for (sal_uInt16 y = 0; y < nHeight; y++ )
+ for (sal_uInt16 y = 0; y < nHeight && pWMF->good(); ++y)
{
sal_uInt16 x = 0;
for (sal_uInt16 scan = 0; scan < nBytesPerScan; scan++ )