mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 09:25:36 -04:00
[netinstall] Avoid crash when do groups are available
- m_groups is only set to a non-nullptr value when data is received and fully processed, - avoid nullptr dereference when paging *back* from a netinstall page that hasn't loaded groups data. FIXES #859
This commit is contained in:
parent
ee0b3b85dc
commit
f424af36d3
1 changed files with 7 additions and 1 deletions
|
@ -113,7 +113,13 @@ NetInstallPage::dataIsHere( QNetworkReply* reply )
|
||||||
|
|
||||||
QList<PackageTreeItem::ItemData> NetInstallPage::selectedPackages() const
|
QList<PackageTreeItem::ItemData> NetInstallPage::selectedPackages() const
|
||||||
{
|
{
|
||||||
return m_groups->getPackages();
|
if ( m_groups )
|
||||||
|
return m_groups->getPackages();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cDebug() << "WARNING: no netinstall groups are available.";
|
||||||
|
return QList<PackageTreeItem::ItemData>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetInstallPage::loadGroupList()
|
void NetInstallPage::loadGroupList()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue