From 7aafea92cec583d616acd532774cbff8cfe39c6c Mon Sep 17 00:00:00 2001 From: water Date: Tue, 17 Aug 2021 21:00:56 -0400 Subject: [PATCH] fix bug --- decompiler/analysis/find_defstates.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/decompiler/analysis/find_defstates.cpp b/decompiler/analysis/find_defstates.cpp index 1b6dbba3d5..d87e39c6d1 100644 --- a/decompiler/analysis/find_defstates.cpp +++ b/decompiler/analysis/find_defstates.cpp @@ -412,6 +412,9 @@ bool is_nonvirtual_state(LetElement* elt) { void run_defstate(Function& top_level_func) { auto& env = top_level_func.ir2.env; auto& pool = *top_level_func.ir2.form_pool; + if (!top_level_func.ir2.top_form) { + return; + } top_level_func.ir2.top_form->apply_form([&](Form* form) { for (auto& fe : form->elts()) { auto as_let = dynamic_cast(fe);