1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

Check for invalid index in IdTable::flags(). This prevents QCompleter from crashes

This commit is contained in:
Stanislav Bas 2015-05-30 22:01:21 +03:00
parent 602f33bd91
commit e943d17b29

View File

@ -84,6 +84,9 @@ bool CSMWorld::IdTable::setData (const QModelIndex &index, const QVariant &value
Qt::ItemFlags CSMWorld::IdTable::flags (const QModelIndex & index) const
{
if (!index.isValid())
return 0;
Qt::ItemFlags flags = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
if (mIdCollection->getColumn (index.column()).isUserEditable())