Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/qtlua.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Bottou <leon@bottou.org>2017-10-19 15:05:15 +0300
committerLeon Bottou <leon@bottou.org>2017-10-19 15:05:15 +0300
commit1eee417d2826d9ea3d9284f5a976757a83973d3e (patch)
tree88f27defe85178c7d6ee0ef6e9011f66210301b9
parent8b80419ca2458e172b0d245999114f2b9d4ac118 (diff)
Fix issues #42 and #34
-rw-r--r--packages/qtwidget/qtlualistener.cpp4
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();
}