From 4b30bf30b8515071d21a1fa79bfed76ad3019989 Mon Sep 17 00:00:00 2001 From: Andrew Lindesay Date: Mon, 5 Nov 2018 22:21:14 +0100 Subject: [PATCH] HaikuDepot : Handling for NULL Identity URLs on Repository Sources Change-Id: I0f0094cf2ed38750dca4783b41f061977d833cea Reviewed-on: https://review.haiku-os.org/677 Reviewed-by: waddlesplash --- .../haikudepot/server/RepositoryDataUpdateProcess.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/apps/haikudepot/server/RepositoryDataUpdateProcess.cpp b/src/apps/haikudepot/server/RepositoryDataUpdateProcess.cpp index b2563e427d..44e7002dec 100644 --- a/src/apps/haikudepot/server/RepositoryDataUpdateProcess.cpp +++ b/src/apps/haikudepot/server/RepositoryDataUpdateProcess.cpp @@ -121,9 +121,15 @@ DepotMatchingRepositoryListener::Handle(DumpExportRepository* repository) BString* URL = repositoryAndRepositorySource .repositorySource->RepoInfoUrl(); + // to be simplified soon because there will no longer be a need to + // check for the baseURL. - if (!baseURL->IsEmpty() || !URL->IsEmpty()) { - fModel->ReplaceDepotByUrl(*URL, *baseURL, this, + if ((baseURL != NULL && !baseURL->IsEmpty()) + || (URL != NULL && !URL->IsEmpty())) { + fModel->ReplaceDepotByUrl( + URL == NULL ? BString() : *URL, + baseURL == NULL ? BString() : *baseURL, + this, &repositoryAndRepositorySource); } }