mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
Ensure the resizing items aren't null (fix Coverity defect 121862).
This commit is contained in:
parent
a0ac9d9f07
commit
749a740ffa
2 changed files with 2 additions and 2 deletions
|
@ -121,7 +121,7 @@ PartitionSplitterWidget::setSplitPartition( const QString& path,
|
||||||
<< "\nmaxSize:" << maxSize
|
<< "\nmaxSize:" << maxSize
|
||||||
<< "\nprfSize:" << preferredSize;
|
<< "\nprfSize:" << preferredSize;
|
||||||
|
|
||||||
if ( m_itemToResize || m_itemToResizeNext || !m_itemToResizePath.isEmpty() )
|
if ( m_itemToResize && m_itemToResizeNext )
|
||||||
{
|
{
|
||||||
cDebug() << "NOTICE: trying to split partition but partition to split is already set.";
|
cDebug() << "NOTICE: trying to split partition but partition to split is already set.";
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ struct PartitionSplitterItem
|
||||||
|
|
||||||
static PartitionSplitterItem null() { return { QString(), QColor(), false, 0, Normal }; }
|
static PartitionSplitterItem null() { return { QString(), QColor(), false, 0, Normal }; }
|
||||||
|
|
||||||
bool isNull() const { return itemPath.isEmpty() && size == 0; }
|
bool isNull() const { return itemPath.isEmpty() && size == 0 && status == Normal; }
|
||||||
operator bool() const { return !isNull(); }
|
operator bool() const { return !isNull(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue