[manager] fix crash when launching BOINC Manager on the fresh system without any projects connected

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
Vitalii Koshura 2024-12-29 22:17:04 +01:00
parent 5c05b2fe6c
commit 45466560e7
No known key found for this signature in database
GPG Key ID: CE0DB1726070A5A3
1 changed files with 6 additions and 2 deletions

View File

@ -276,8 +276,12 @@ void CProjectInfoPage::CreateControls()
// canonicalized and trimmed URLs. This will be used for comparing against the master list of projects // canonicalized and trimmed URLs. This will be used for comparing against the master list of projects
// to visually indicate which projectes have already been attached. // to visually indicate which projectes have already been attached.
// //
for (unsigned int i = 0; i < pDoc->GetProjectCount(); i++) { for (int i = 0; i < pDoc->GetProjectCount(); i++) {
tempstring = pDoc->project(i)->master_url; PROJECT* pProject = pDoc->project(i);
if (!pProject) {
continue;
}
tempstring = pProject->master_url;
canonicalize_master_url(tempstring); canonicalize_master_url(tempstring);
TrimURL(tempstring); TrimURL(tempstring);
m_pTrimmedURL_attached.push_back(tempstring); m_pTrimmedURL_attached.push_back(tempstring);