Installer: Check return value of GetMountPoint.

Probably fixes #14586 (NULL dereference in the strcmp on the next line)
but I couldn't quite manage to reproduce it.
This commit is contained in:
Augustin Cavalier 2018-12-15 17:37:50 -05:00
parent 414b21c497
commit 72fa4a2e5e

View File

@ -773,7 +773,8 @@ SourceVisitor::Visit(BPartition *partition, int32 level)
bool isBootPartition = false;
if (partition->IsMounted()) {
BPath mountPoint;
partition->GetMountPoint(&mountPoint);
if (partition->GetMountPoint(&mountPoint) != B_OK)
return false;
isBootPartition = strcmp(BOOT_PATH, mountPoint.Path()) == 0;
}