forked from OSchip/llvm-project
[llvm-rc] Use cast<> instead of dyn_cast<> to avoid dereference of nullptr
The pointer is dereferenced immediately, so assert the cast is correct instead of returning nullptr
This commit is contained in:
parent
aedea002b4
commit
9031e5113c
|
@ -875,7 +875,7 @@ Error ResourceFileWriter::visitIconOrCursorResource(const RCResource *Base) {
|
|||
FileStr = IconRes->IconLoc;
|
||||
Type = IconCursorGroupType::Icon;
|
||||
} else {
|
||||
auto *CursorRes = dyn_cast<CursorResource>(Base);
|
||||
auto *CursorRes = cast<CursorResource>(Base);
|
||||
FileStr = CursorRes->CursorLoc;
|
||||
Type = IconCursorGroupType::Cursor;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue