prevent possible segfault with instructions without params, like RDTSC

This commit is contained in:
Basile Burg 2016-12-24 19:55:33 +01:00
parent e5708325c1
commit 92037b5e7c
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ final class UnusedLabelCheck : BaseAnalyzer
if (instr.identifierOrIntegerOrOpcode.text.length)
jmp = instr.identifierOrIntegerOrOpcode.text[0] == 'j';
if (!jmp || instr.operands.operands.length != 1)
if (!jmp || !instr.operands || instr.operands.operands.length != 1)
return;
const AsmExp e = cast(AsmExp) instr.operands.operands[0];