PackageLinksDirectory::AddPackage(): Fix check

This commit is contained in:
Ingo Weinhold
2011-11-25 06:18:03 +01:00
parent f2235ed5bf
commit cc92b95487
@@ -116,7 +116,7 @@ PackageLinksDirectory::AddPackage(Package* package)
// There already is an entry with the name. // There already is an entry with the name.
PackageLinkDirectory* otherLinkDirectory PackageLinkDirectory* otherLinkDirectory
= dynamic_cast<PackageLinkDirectory*>(child); = dynamic_cast<PackageLinkDirectory*>(child);
if (otherLinkDirectory != NULL) if (otherLinkDirectory == NULL)
RETURN_ERROR(B_BAD_VALUE); RETURN_ERROR(B_BAD_VALUE);
// There's already a package link directory. Delete the one we created // There's already a package link directory. Delete the one we created