[calamares] Avoid possible uninit-pointer or memory leak

main
Adriaan de Groot 7 years ago
parent 0c0f0fc8b4
commit 3e4b1a7c46

@ -24,6 +24,7 @@
ProgressTreeModel::ProgressTreeModel( QObject* parent )
: QAbstractItemModel( parent )
, m_rootItem( nullptr )
{
setupModelData();
}
@ -134,6 +135,8 @@ ProgressTreeModel::columnCount( const QModelIndex& parent ) const
void
ProgressTreeModel::setupModelData()
{
delete m_rootItem;
m_rootItem = new ProgressTreeRoot();
const Calamares::ViewManager* vm = Calamares::ViewManager::instance();

Loading…
Cancel
Save