cid#704596 dereference after null check

this code dates back to the first commit, if the null check was
valid the dereference should have triggered a bug by now.

Change-Id: I7746bd26b6760dec4db522938e40a323be9ae4d8
This commit is contained in:
Noel Grandin
2014-02-13 12:12:31 +02:00
parent 97c4c1cf51
commit cf2e95aa5a

View File

@@ -1052,10 +1052,7 @@ void
MenuSaveInData::SetEntries( SvxEntries* pNewEntries )
{
// delete old menu hierarchy first
if ( pRootEntry != NULL )
{
delete pRootEntry->GetEntries();
}
delete pRootEntry->GetEntries();
// now set new menu hierarchy
pRootEntry->SetEntries( pNewEntries );