mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-26 07:23:55 +08:00
Merge branch 'GP-0_ryanmkurtz_PR-9304_pgalbraith_fix_9303-npe'
This commit is contained in:
+8
-1
@@ -69,7 +69,14 @@ public class ForceUnionAction extends AbstractDecompilerAction {
|
||||
}
|
||||
Varnode vn = tokenAtCursor.getVarnode();
|
||||
if (vn != null) {
|
||||
DataType dt = vn.getHigh().getDataType();
|
||||
// Some Varnodes -- volatile-memory loads in particular -- never get
|
||||
// a HighVariable assigned during decompile, so getHigh() can be null.
|
||||
// Same guard pattern as typeIsUnionRelated below.
|
||||
HighVariable high = vn.getHigh();
|
||||
if (high == null) {
|
||||
return null;
|
||||
}
|
||||
DataType dt = high.getDataType();
|
||||
if (dt instanceof TypeDef) {
|
||||
dt = ((TypeDef) dt).getBaseDataType();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user