[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:
Adriaan de Groot 2017-11-06 05:25:14 -05:00
parent ee0b3b85dc
commit f424af36d3

View File

@ -113,7 +113,13 @@ NetInstallPage::dataIsHere( QNetworkReply* reply )
QList<PackageTreeItem::ItemData> NetInstallPage::selectedPackages() const
{
if ( m_groups )
return m_groups->getPackages();
else
{
cDebug() << "WARNING: no netinstall groups are available.";
return QList<PackageTreeItem::ItemData>();
}
}
void NetInstallPage::loadGroupList()