Skip to content

Commit d347022

Browse files
committed
Make sure we have a symbol before using it
1 parent a3837fe commit d347022

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Lower/OpenMP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,7 @@ bool ClauseProcessor::processMap(
18561856
auto origSymbol =
18571857
converter.getSymbolAddress(*getOmpObjectSymbol(ompObject));
18581858
mlir::Value mapOp, symAddr;
1859-
if (fir::isTypeWithDescriptor(origSymbol.getType())) {
1859+
if (origSymbol && fir::isTypeWithDescriptor(origSymbol.getType())) {
18601860
symAddr = origSymbol;
18611861
mapOp = processDescriptorTypeMappings(
18621862
semanticsContext, stmtCtx, converter, clauseLocation,

0 commit comments

Comments
 (0)