mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 01:15:38 -04:00
PartitionModule: avoid nullptr crashes
Fix up iterator code so that it handles nullptr better. This avoids part of #686.
This commit is contained in:
parent
3677708d3e
commit
92a2c7aa70
2 changed files with 7 additions and 2 deletions
|
@ -157,9 +157,9 @@ PartitionCoreModule::doInit()
|
|||
|
||||
// Remove the device which contains / from the list
|
||||
for ( QList< Device* >::iterator it = devices.begin(); it != devices.end(); )
|
||||
if ( hasRootPartition( *it ) ||
|
||||
if ( *it && ( hasRootPartition( *it ) ||
|
||||
(*it)->deviceNode().startsWith( "/dev/zram") ||
|
||||
isIso9660( *it ) )
|
||||
isIso9660( *it ) ) )
|
||||
it = devices.erase( it );
|
||||
else
|
||||
++it;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue