diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-20 17:12:43 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-20 22:52:01 +0200 |
commit | 1110726b24de47f598edf6e6d4578cd7d7a15f78 (patch) | |
tree | d40db35d6020e3dad8debdf2811e8964930a32ab /include/vcl/outdev.hxx | |
parent | b33ff1a083d95388997cf301d8a1538a41c08255 (diff) |
Restructure DrawOutDevDirectCheck to avoid using uninitialized pointer
The check for source device's mpGraphics is moved into drawOutDevDirect,
since failing it must result in immediate return from the function.
Check for this->mpGraphics also moved into drawOutDevDirect, since it's
dereferenced in DrawOutDevDirectProcess, unclear why was it skipped in
some cases previously.
Removed unreachable warning.
Change-Id: I4ad882f8f60d6543786aef2ec1651e499d47874d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94463
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/vcl/outdev.hxx')
-rw-r--r-- | include/vcl/outdev.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index f2e19567150e..e7c014ee3561 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -561,7 +561,7 @@ protected: virtual tools::Rectangle SetBackgroundComponentBounds(); - virtual void DrawOutDevDirectCheck( const OutputDevice* pSrcDev, SalGraphics*& pSrcGraphics ); + virtual const OutputDevice* DrawOutDevDirectCheck(const OutputDevice* pSrcDev) const; virtual void DrawOutDevDirectProcess( const OutputDevice* pSrcDev, SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ); |