Skip to content

Commit b5507f7

Browse files
sudo-pandavgvassilev
authored andcommitted
Add nullptr check to GetCanonicalType
1 parent cf2ec3b commit b5507f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Interpreter/CppInterOp.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,8 @@ namespace Cpp {
12031203

12041204
TCppType_t GetCanonicalType(TCppType_t type)
12051205
{
1206+
if (!type)
1207+
return 0;
12061208
QualType QT = QualType::getFromOpaquePtr(type);
12071209
return QT.getCanonicalType().getAsOpaquePtr();
12081210
}

0 commit comments

Comments
 (0)