diff options
Diffstat (limited to 'vcl/source/gdi/region.cxx')
-rw-r--r-- | vcl/source/gdi/region.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index bcc8a0c96e9a..ab711c245c3d 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -1586,7 +1586,7 @@ SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& rRegion) default: { RegionBand* pNewRegionBand = new RegionBand(); - pNewRegionBand->load(rIStrm); + bool bSuccess = pNewRegionBand->load(rIStrm); rRegion.mpRegionBand.reset(pNewRegionBand); if(aCompat.GetVersion() >= 2) @@ -1603,6 +1603,12 @@ SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& rRegion) } } + if (!bSuccess) + { + SAL_WARN("vcl.gdi", "bad region band"); + rRegion.SetNull(); + } + break; } } |