[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
@ -113,7 +113,13 @@ NetInstallPage::dataIsHere( QNetworkReply* reply )
|
||||
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user