diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-17 14:15:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-17 17:43:03 +0200 |
commit | 3ddd11d18a24ebd8cbc3e5ac8d460b4888cade07 (patch) | |
tree | 33b1522faecf10838c066f1d7fb4e6ed98393254 /sw | |
parent | 1148d6ad13b444c179aacdb693bd82e37d0ed32d (diff) |
WaE: C6011 Dereferencing NULL pointer warnings
Change-Id: I18b18f5d430e626dea9163aec0bf99ab09c5c71b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167780
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 30fbebc4fbc3..e1787614f732 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -5521,17 +5521,21 @@ static void ParaTabStopDelAdd( WW8Export& rWrt, aTab.Add(*pTN, nLParaMgn); // must be inserted nN++; } - else if (lcl_IsEqual(nOP, *pTO, nNP, *pTN)) // tabs are equal - { - nO++; // nothing to do - nN++; - } - else // tabs same position, different type + else { - aTab.Del(*pTO, nLStypeMgn); // delete old one - aTab.Add(*pTN, nLParaMgn); // insert new one - nO++; - nN++; + assert(pTO && pTN); + if (lcl_IsEqual(nOP, *pTO, nNP, *pTN)) // tabs are equal + { + nO++; // nothing to do + nN++; + } + else // tabs same position, different type + { + aTab.Del(*pTO, nLStypeMgn); // delete old one + aTab.Add(*pTN, nLParaMgn); // insert new one + nO++; + nN++; + } } } while( true ); |