PackageLinksDirectory::AddPackage(): Fix check

This commit is contained in:
Ingo Weinhold 2011-06-24 12:13:45 +02:00
parent 1becdcc7c8
commit 70c2780c73

View File

@ -116,7 +116,7 @@ PackageLinksDirectory::AddPackage(Package* package)
// There already is an entry with the name.
PackageLinkDirectory* otherLinkDirectory
= dynamic_cast<PackageLinkDirectory*>(child);
if (otherLinkDirectory != NULL)
if (otherLinkDirectory == NULL)
RETURN_ERROR(B_BAD_VALUE);
// There's already a package link directory. Delete the one we created