diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-07-01 12:50:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-07-01 15:32:30 +0200 |
commit | 92ec5c70691778ccff8a37be361e638379ee6b4d (patch) | |
tree | c6361b8b320d748654384ee0dc99ae87504a8c9e | |
parent | 0211c88f884065aa179725bd2eb846edd4c5bb6b (diff) |
cid#1500458 help coverity see that Dereference after null check is false
Change-Id: Ieb61797fa230d4b7d7650cfcb8b7c988bf292189
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153822
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | chart2/source/controller/main/ControllerCommandDispatch.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index 98468a138c3f..5317c1c47c06 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -678,9 +678,9 @@ void ControllerCommandDispatch::updateCommandAvailability() m_aCommandAvailability[ ".uno:InsertDataLabel" ] = bIsWritable; m_aCommandAvailability[ ".uno:InsertMeanValue" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddMeanValue; m_aCommandAvailability[ ".uno:InsertTrendline" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendline; - m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendlineEquation; - m_aCommandAvailability[ ".uno:InsertTrendlineEquationAndR2" ] = - m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] && m_apControllerState->bMayAddR2Value; + const bool bInsertTrendlineEquation = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddTrendlineEquation; + m_aCommandAvailability[ ".uno:InsertTrendlineEquation" ] = bInsertTrendlineEquation; + m_aCommandAvailability[ ".uno:InsertTrendlineEquationAndR2" ] = bInsertTrendlineEquation && m_apControllerState->bMayAddR2Value; m_aCommandAvailability[ ".uno:InsertR2Value" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayAddR2Value && !m_apControllerState->bMayAddTrendlineEquation; m_aCommandAvailability[ ".uno:DeleteR2Value" ] = bIsWritable && bControllerStateIsValid && m_apControllerState->bMayDeleteR2Value; |