Assert that either both or neither pointer are nullptr
Identical change to qmetatype.cpp Fixes static analyzer warning 0267bc9b3ba521cf8bf0a7fea8981ee5 Pick-to: 6.1 Change-Id: Id6219f5025d703dd43b1742a067aa934d6aacd8c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
f0cc9f10da
commit
3be3848338
@ -117,6 +117,8 @@ static const struct : QMetaTypeModuleHelper
|
||||
Q_ASSERT(fromTypeId != toTypeId);
|
||||
|
||||
bool onlyCheck = (from == nullptr && to == nullptr);
|
||||
// either two nullptrs from canConvert, or two valid pointers
|
||||
Q_ASSERT(onlyCheck || (bool(from) && bool(to)));
|
||||
|
||||
using Int = int;
|
||||
switch (makePair(toTypeId, fromTypeId)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user