diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 029a261faf..c8456192ed 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2445,6 +2445,8 @@ bool QVariant::canConvert(int targetTypeId) const if (currentType == uint(targetTypeId)) return true; + if (targetTypeId < 0 || targetTypeId >= QMetaType::User) + return false; // FIXME It should be LastCoreType intead of Uuid if (currentType > int(QMetaType::QUuid) || targetTypeId > int(QMetaType::QUuid)) { |