~NameIndex(): Make more robust

Remove the listener only, if it was registered.
This commit is contained in:
Ingo Weinhold 2011-07-07 08:12:28 +02:00
parent 8373bcd169
commit 670b0d106a

View File

@ -130,7 +130,7 @@ NameIndex::NameIndex()
NameIndex::~NameIndex()
{
if (fVolume != NULL)
if (IsListening())
fVolume->RemoveNodeListener(this);
delete fEntries;