summaryrefslogtreecommitdiff
path: root/vcl/workben/vcldemo.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-14 13:58:14 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-14 14:14:36 +0200
commit0869895063bd528893707cb74c6cf4c461fef066 (patch)
treebf47ccc71145f3ee387a5dafbaab9bc86b47a008 /vcl/workben/vcldemo.cxx
parent4acae16f9252ada89fd530f1ca86edafc046bc07 (diff)
tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie4bc74a734a6d5a73838a27e0d80cc8e51595839 Reviewed-on: https://gerrit.libreoffice.org/70730 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/workben/vcldemo.cxx')
-rw-r--r--vcl/workben/vcldemo.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 4a0fe21efc11..b9e4f26af815 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -2177,9 +2177,13 @@ public:
// get some other guys to leach off this context
VclPtrInstance<VirtualDevice> xVDev;
- rtl::Reference<OpenGLContext> pContext = getImpl(xVDev)->GetOpenGLContext();
+ OpenGLSalGraphicsImpl* pImpl = getImpl(xVDev);
+ assert(pImpl);
+ rtl::Reference<OpenGLContext> pContext = pImpl->GetOpenGLContext();
VclPtrInstance<VirtualDevice> xVDev2;
- rtl::Reference<OpenGLContext> pContext2 = getImpl(xVDev)->GetOpenGLContext();
+ OpenGLSalGraphicsImpl* pImpl2 = getImpl(xVDev2);
+ assert(pImpl2);
+ rtl::Reference<OpenGLContext> pContext2 = pImpl2->GetOpenGLContext();
// sharing the same off-screen context.
assert(pContext == pContext2);