mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 00:36:46 +00:00
Check for invalid index in IdTable::flags(). This prevents QCompleter from crashes
This commit is contained in:
parent
602f33bd91
commit
e943d17b29
1 changed files with 3 additions and 0 deletions
|
@ -84,6 +84,9 @@ bool CSMWorld::IdTable::setData (const QModelIndex &index, const QVariant &value
|
||||||
|
|
||||||
Qt::ItemFlags CSMWorld::IdTable::flags (const QModelIndex & index) const
|
Qt::ItemFlags CSMWorld::IdTable::flags (const QModelIndex & index) const
|
||||||
{
|
{
|
||||||
|
if (!index.isValid())
|
||||||
|
return 0;
|
||||||
|
|
||||||
Qt::ItemFlags flags = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
|
Qt::ItemFlags flags = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
|
||||||
|
|
||||||
if (mIdCollection->getColumn (index.column()).isUserEditable())
|
if (mIdCollection->getColumn (index.column()).isUserEditable())
|
||||||
|
|
Loading…
Reference in a new issue