mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-14 08:54:34 +12:00
Corrects a potential segfault
This commit is contained in:
parent
b45a32cfde
commit
fca0e9679f
|
@ -33,6 +33,9 @@ class characterModel(QAbstractItemModel):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def data(self, index, role=Qt.DisplayRole):
|
def data(self, index, role=Qt.DisplayRole):
|
||||||
|
if not index.isValid():
|
||||||
|
return None
|
||||||
|
|
||||||
c = index.internalPointer()
|
c = index.internalPointer()
|
||||||
if type(c) == Character:
|
if type(c) == Character:
|
||||||
if role == Qt.DisplayRole:
|
if role == Qt.DisplayRole:
|
||||||
|
|
Loading…
Reference in a new issue