Skip to content

Commit

Permalink
Update qtwidget.cpp
Browse files Browse the repository at this point in the history
fix building error "ordered comparison between pointer and zero"
  • Loading branch information
OlivierMorere authored Jun 8, 2018
1 parent 1eee417 commit 7c018f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/qtwidget/qtwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
static QMetaEnum
f_enumerator(const char *s, const QMetaObject *mo)
{
int index = mo->indexOfEnumerator(s);
if (mo >= 0)
int index = (mo) ? mo->indexOfEnumerator(s) : -1;
if (index >= 0)
return mo->enumerator(index);
return QMetaEnum();
}
Expand Down

0 comments on commit 7c018f3

Please sign in to comment.