mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[libcalamaresui] Avoid nullptr deref
- there's a check already there, and probably this means things are hopelessly broken anyway, but let's not crash here.
This commit is contained in:
parent
4a6ee39f8b
commit
347a25d13d
1 changed files with 11 additions and 7 deletions
|
@ -128,15 +128,19 @@ ViewManager::insertViewStep( int before, ViewStep* step )
|
|||
{
|
||||
cError() << "ViewStep" << step->moduleInstanceKey() << "has no widget.";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
// step->adjustMargins() "some magic"
|
||||
QLayout* layout = step->widget()->layout();
|
||||
if ( layout )
|
||||
{
|
||||
layout->setContentsMargins( 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
m_stack->insertWidget( before, step->widget() );
|
||||
m_stack->setCurrentIndex( 0 );
|
||||
step->widget()->setFocus();
|
||||
}
|
||||
emit endInsertRows();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue