Merge pull request #5982 from BOINC/vko_fix_manager_add_projects_when_fresh

[manager] fix crash when launching BOINC Manager on the fresh system without any projects connected
This commit is contained in:
Vitalii Koshura 2024-12-29 22:48:31 +01:00 committed by GitHub
commit c28b036222
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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
// to visually indicate which projectes have already been attached.
//
for (unsigned int i = 0; i < pDoc->GetProjectCount(); i++) {
tempstring = pDoc->project(i)->master_url;
for (int i = 0; i < pDoc->GetProjectCount(); i++) {
PROJECT* pProject = pDoc->project(i);
if (!pProject) {
continue;
}
tempstring = pProject->master_url;
canonicalize_master_url(tempstring);
TrimURL(tempstring);
m_pTrimmedURL_attached.push_back(tempstring);