Don't crash on completion items without icon
This commit is contained in:
parent
e6ed34bcc8
commit
d5834e0cf0
@ -71,6 +71,8 @@ class CompletionItemDelegate(QStyledItemDelegate):
|
|||||||
"""Draw the icon of an ItemViewItem."""
|
"""Draw the icon of an ItemViewItem."""
|
||||||
icon_rect = self._style.subElementRect(
|
icon_rect = self._style.subElementRect(
|
||||||
self._style.SE_ItemViewItemDecoration, self._opt, self._opt.widget)
|
self._style.SE_ItemViewItemDecoration, self._opt, self._opt.widget)
|
||||||
|
if icon_rect.isNull():
|
||||||
|
return
|
||||||
qt_ensure_valid(icon_rect)
|
qt_ensure_valid(icon_rect)
|
||||||
|
|
||||||
mode = QIcon.Normal
|
mode = QIcon.Normal
|
||||||
|
Loading…
Reference in New Issue
Block a user