diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-02-04 09:25:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-04 09:30:11 +0000 |
commit | 7b0b9da7cb9a342c060666ea9d60bca700e25359 (patch) | |
tree | 66478ce14d1d2fa5453cd2da1cd2270b6748b3a8 /wizards | |
parent | a18d3ed2e8e224a4ae2244342df51a9651aadb5c (diff) |
coverity#1351756 Dereference before null check
Change-Id: Iae465c91693967983623087214e79e0f264c551c
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/document/Control.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java index 9ff4691d2760..5731aa7cf26f 100644 --- a/wizards/com/sun/star/wizards/document/Control.java +++ b/wizards/com/sun/star/wizards/document/Control.java @@ -185,21 +185,21 @@ public class Control extends Shape else { Size aPeerSize = getPeerSize(); - int aWidth; + int nWidth; if (aPeerSize == null) - aWidth = 0; + nWidth = 0; else - aWidth = aPeerSize.Width; + nWidth = aPeerSize.Width; // We increase the preferred Width a bit so that the control does not become too small // when we change the border from "3D" to "Flat" if (getControlType() == FormHandler.SOCHECKBOX) { - return aWidth * oFormHandler.getXPixelFactor(); + return nWidth * oFormHandler.getXPixelFactor(); } else { - return (aWidth * oFormHandler.getXPixelFactor()) + 200; + return (nWidth * oFormHandler.getXPixelFactor()) + 200; } } } @@ -213,11 +213,11 @@ public class Control extends Shape else { Size aPeerSize = getPeerSize(); - int nHeight = aPeerSize.Height; + int nHeight; if (aPeerSize == null) - nHeight = 0; + nHeight = 0; else - nHeight = aPeerSize.Height; + nHeight = aPeerSize.Height; // We increase the preferred Height a bit so that the control does not become too small // when we change the border from "3D" to "Flat" |