~NameIndex(): Make more robust

Remove the listener only, if it was registered.
This commit is contained in:
Ingo Weinhold
2011-07-17 16:55:05 +02:00
parent 49d2f608d4
commit fb88975a7b
@@ -130,7 +130,7 @@ NameIndex::NameIndex()
NameIndex::~NameIndex() NameIndex::~NameIndex()
{ {
if (fVolume != NULL) if (IsListening())
fVolume->RemoveNodeListener(this); fVolume->RemoveNodeListener(this);
delete fEntries; delete fEntries;