Kaydet (Commit) 13fdf04f authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1323757 Dereference before null check

Change-Id: I5353b78b6961d28fb3f42e5f2073e9a83ac1037c
üst a9373197
......@@ -706,9 +706,11 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
}
break;
case HANDLE_VIEWSET_ONLINE_LAYOUT :
{
if ( pView )
{
SwViewOption aOpt(*pView->GetWrtShell().GetViewOptions());
if (pView && !bVal != !aOpt.getBrowseMode())
if (!bVal != !aOpt.getBrowseMode())
{
aOpt.setBrowseMode( bVal );
pView->GetWrtShell().ApplyViewOptions( aOpt );
......@@ -720,11 +722,14 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
pView->GetDocShell()->ToggleLayoutMode(pView);
}
}
}
break;
case HANDLE_VIEWSET_HIDE_WHITESPACE:
{
if ( pView )
{
SwViewOption aOpt(*pView->GetWrtShell().GetViewOptions());
if (pView && !bVal != !aOpt.IsHideWhitespaceMode())
if (!bVal != !aOpt.IsHideWhitespaceMode())
{
aOpt.SetHideWhitespaceMode( bVal );
pView->GetWrtShell().ApplyViewOptions( aOpt );
......@@ -736,6 +741,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
pView->GetDocShell()->ToggleLayoutMode(pView);
}
}
}
break;
case HANDLE_VIEWSET_HELP_URL:
{
......
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