Kaydet (Commit) 583c0ee3 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1187660 Dereference after null check

Change-Id: I41a05e34c9b1dd312602f2c499793a4568473394
üst 43d42775
......@@ -605,9 +605,17 @@ void PushButton::ImplInitPushButtonData()
mbInUserDraw = false;
}
<<<namespace
{
Window* getPreviousSibling(Window *pParent)
{
return pParent ? pParent->GetWindow(WINDOW_LASTCHILD) : NULL;
}
}
void PushButton::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
Button::ImplInit( pParent, nStyle, NULL );
if ( nStyle & WB_NOLIGHTBORDER )
......@@ -1808,7 +1816,7 @@ void RadioButton::ImplInitRadioButtonData()
void RadioButton::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
Button::ImplInit( pParent, nStyle, NULL );
ImplInitSettings( true, true, true );
......@@ -2930,7 +2938,7 @@ void CheckBox::ImplInitCheckBoxData()
void CheckBox::ImplInit( Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle );
nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
Button::ImplInit( pParent, nStyle, NULL );
ImplInitSettings( true, true, true );
......
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