diff options
author | Leon Bottou <leon@bottou.org> | 2017-10-19 15:05:15 +0300 |
---|---|---|
committer | Leon Bottou <leon@bottou.org> | 2017-10-19 15:05:15 +0300 |
commit | 1eee417d2826d9ea3d9284f5a976757a83973d3e (patch) | |
tree | 88f27defe85178c7d6ee0ef6e9011f66210301b9 | |
parent | 8b80419ca2458e172b0d245999114f2b9d4ac118 (diff) |
Fix issues #42 and #34
-rw-r--r-- | packages/qtwidget/qtlualistener.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/qtwidget/qtlualistener.cpp b/packages/qtwidget/qtlualistener.cpp index 6f07e00..3c2097d 100644 --- a/packages/qtwidget/qtlualistener.cpp +++ b/packages/qtwidget/qtlualistener.cpp @@ -21,8 +21,8 @@ f_enumerator(const char *s) static const QMetaObject* qt() { return &staticQtMetaObject; } }; const QMetaObject *mo = QFakeObject::qt(); - int index = mo->indexOfEnumerator(s); - if (mo >= 0) + int index = (mo) ? mo->indexOfEnumerator(s) : -1; + if (index >= 0) return mo->enumerator(index); return QMetaEnum(); } |