Kaydet (Commit) 7b0b9da7 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1351756 Dereference before null check

Change-Id: Iae465c91693967983623087214e79e0f264c551c
üst a18d3ed2
......@@ -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,7 +213,7 @@ public class Control extends Shape
else
{
Size aPeerSize = getPeerSize();
int nHeight = aPeerSize.Height;
int nHeight;
if (aPeerSize == null)
nHeight = 0;
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment