diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-23 10:47:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-23 14:56:00 +0100 |
commit | 1af6ac544894fe9840716b0d4992852c16e73614 (patch) | |
tree | 150294103127ada6067043d6adbd177dd7333408 /chart2/source | |
parent | b952a98a7f25ddd831e8b4e2604867d95ba1b975 (diff) |
cid#1500434 Dereference after null check
Change-Id: I1a9531446fbd5f977d02775f5d25696aba16287d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130431
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source')
-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 d7406d3dbf60..33649bfd7a1f 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -562,12 +562,12 @@ void ControllerCommandDispatch::updateCommandAvailability() // toolbar commands m_aCommandAvailability[ ".uno:ToggleGridHorizontal" ] = bIsWritable; - m_aCommandArguments[ ".uno:ToggleGridHorizontal" ] <<= m_apModelState->bHasMainYGrid; + m_aCommandArguments[ ".uno:ToggleGridHorizontal" ] <<= bModelStateIsValid && m_apModelState->bHasMainYGrid; m_aCommandAvailability[ ".uno:ToggleGridVertical" ] = bIsWritable; - m_aCommandArguments[ ".uno:ToggleGridVertical" ] <<= m_apModelState->bHasMainXGrid; + m_aCommandArguments[ ".uno:ToggleGridVertical" ] <<= bModelStateIsValid && m_apModelState->bHasMainXGrid; m_aCommandAvailability[ ".uno:ToggleLegend" ] = bIsWritable; - m_aCommandArguments[ ".uno:ToggleLegend" ] <<= m_apModelState->bHasLegend; + m_aCommandArguments[ ".uno:ToggleLegend" ] <<= bModelStateIsValid && m_apModelState->bHasLegend; m_aCommandAvailability[ ".uno:NewArrangement" ] = bIsWritable; m_aCommandAvailability[ ".uno:Update" ] = bIsWritable; |