[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
main
Adriaan de Groot 7 years ago
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…
Cancel
Save