[partition] Remove superfluous null check

delete is specified to handle nullptr gracefully.

FIXES #1012
This commit is contained in:
Adriaan de Groot 2018-08-20 06:03:40 -04:00
parent 81ea5f5249
commit 08d41f745b

View file

@ -98,8 +98,7 @@ erase(DeviceList& l, DeviceList::iterator& it)
{
Device* p = *it;
auto r = l.erase( it );
if (p)
delete p;
delete p;
return r;
}