summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/outdev.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-03 17:16:13 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-03 20:41:07 +0000
commit188b0d899c277a2ac2b0c5f52d992db2b45a882d (patch)
treebc25d588b5930669da49284f8f80ce0a63e923ff /vcl/source/outdev/outdev.cxx
parent8e399602ea7aa11a81d704ff6ce8e660df4205b9 (diff)
coverity#1209395 Dereference after null check
since commit 808d273db098e2269e53813595a6bfc7b160e28e Date: Fri Apr 25 11:56:54 2014 +1000 Remove ImpInitOutDevData and ImplDeInitOutDevData in OutputDevice All these do is some very, very basic initialization. There is no need to lazy load the structure, it should be initialized when OutputDevice is created in the constructor and deinitialized in the destructor. mpOutDevData is never NULL Change-Id: Ie08f7520e8c09b57e056c086bba3089abe2486fa
Diffstat (limited to 'vcl/source/outdev/outdev.cxx')
-rw-r--r--vcl/source/outdev/outdev.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 546f36d3da71..3c9e519cc71d 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -96,7 +96,6 @@ OutputDevice::OutputDevice() :
mpGetDevFontList = NULL;
mpGetDevSizeList = NULL;
mpOutDevStateStack = new boost::ptr_deque<OutDevState>();
- mpOutDevData = NULL;
mpPDFWriter = NULL;
mpAlphaVDev = NULL;
mpExtOutDevData = NULL;
@@ -191,16 +190,12 @@ OutputDevice::~OutputDevice()
mpUnoGraphicsList = NULL;
}
- if ( mpOutDevData )
- {
- if ( mpOutDevData->mpRotateDev )
- delete mpOutDevData->mpRotateDev;
+ delete mpOutDevData->mpRotateDev;
- // #i75163#
- ImplInvalidateViewTransform();
+ // #i75163#
+ ImplInvalidateViewTransform();
- delete mpOutDevData;
- }
+ delete mpOutDevData;
// for some reason, we haven't removed state from the stack properly
if ( !mpOutDevStateStack->empty() )
@@ -783,7 +778,7 @@ bool OutputDevice::HasMirroredGraphics() const
bool OutputDevice::ImplIsRecordLayout() const
{
- return mpOutDevData && mpOutDevData->mpRecordLayout;
+ return mpOutDevData->mpRecordLayout;
}
// EPS public function