[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 22 12:15:26 UTC 2021
vcl/unx/generic/app/saldisp.cxx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit d9fe5f17eeec56d91cd6792adf134579b51e83d2
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 22 10:09:47 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Mar 22 13:14:34 2021 +0100
cid#1473727 Uninitialized scalar field
Change-Id: Iff6ae0cb0eb849ddc3f52861370b3a198064ea86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112869
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index b736d0a09249..44362fc86a3f 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2352,9 +2352,9 @@ bool SalDisplay::XIfEventWithTimeout( XEvent* o_pEvent, XPointer i_pPredicateDat
return bRet;
}
-SalVisual::SalVisual():
- eRGBMode_(SalRGB::RGB), nRedShift_(0), nGreenShift_(0), nBlueShift_(0), nRedBits_(0), nGreenBits_(0),
- nBlueBits_(0)
+SalVisual::SalVisual()
+ : eRGBMode_(SalRGB::RGB), nRedShift_(0), nGreenShift_(0), nBlueShift_(0)
+ , nRedBits_(0), nGreenBits_(0), nBlueBits_(0)
{
visual = nullptr;
}
@@ -2363,7 +2363,12 @@ SalVisual::SalVisual( const XVisualInfo* pXVI )
{
*static_cast<XVisualInfo*>(this) = *pXVI;
if( GetClass() != TrueColor )
+ {
+ eRGBMode_ = SalRGB::RGB;
+ nRedShift_ = nGreenShift_ = nBlueShift_;
+ nRedBits_ = nGreenBits_ = nBlueBits_;
return;
+ }
nRedShift_ = sal_Shift( red_mask );
nGreenShift_ = sal_Shift( green_mask );
More information about the Libreoffice-commits
mailing list