commit 03a0e983bc3d926d80c279e1c63ff401487e0062
Author: Guillaume Munch <[email protected]>
Date: Sat Dec 3 23:35:14 2016 +0100
GuiSymbols: handle the case of an invalid data
The docs do not guarantee that the index must be valid
---
src/frontends/qt4/GuiSymbols.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/frontends/qt4/GuiSymbols.cpp b/src/frontends/qt4/GuiSymbols.cpp
index a08d7e5..2aadfff 100644
--- a/src/frontends/qt4/GuiSymbols.cpp
+++ b/src/frontends/qt4/GuiSymbols.cpp
@@ -218,6 +218,9 @@ public:
QVariant data(QModelIndex const & index, int role) const
{
+ if (!index.isValid())
+ return QVariant();
+
static QString const strCharacter = qt_("Character: ");
static QString const strCodePoint = qt_("Code Point: ");