diff --git a/service/type-analysis/WholeProgramState.cpp b/service/type-analysis/WholeProgramState.cpp index 9303cb1efa3..a8430a37cd5 100644 --- a/service/type-analysis/WholeProgramState.cpp +++ b/service/type-analysis/WholeProgramState.cpp @@ -272,7 +272,7 @@ void WholeProgramState::analyze_clinits_and_ctors( const auto& ctors = cls->get_ctors(); for (auto* ctor : ctors) { - if (!is_reachable(gta, ctor)) { + if (!is_reachable(gta, ctor) || !ctor->get_code()) { continue; } IRCode* code = ctor->get_code();