coverity#735808 Dereference after null check

Change-Id: Idd8ff57f5c970d15e199831bb1b1251ced32eeec
This commit is contained in:
Caolán McNamara 2014-02-24 09:44:17 +00:00
parent b854cb787e
commit e40a7f2e59

View File

@ -273,7 +273,7 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
// If the "OK" was selected on the Options page while the sort
// direction was changed, then the first field (i.e. nFieldArr[0])
// of the respective direction is chosen as the sorting criterion:
if ( bSortByRows != pDlg->GetByRows() )
if ( pDlg && bSortByRows != pDlg->GetByRows() )
{
for ( sal_uInt16 i=0; i<nSortKeyCount; i++ )
aNewSortData.maKeyState[i].nField = ( bSortByRows ?