GP-5790: Fix NPE on "Select Current Module" when cursor is not in a module.

This commit is contained in:
Dan 2025-07-01 17:57:15 +00:00
parent 2727715539
commit 044bd03ccb

View file

@ -1113,6 +1113,10 @@ public class DebuggerModulesProvider extends ComponentProviderAdapter
} }
bestModule = module; bestModule = module;
} }
if (bestModule == null) {
setSelectedModules(Set.of());
return;
}
if (bestModule.getSections(snap).isEmpty()) { if (bestModule.getSections(snap).isEmpty()) {
setSelectedModules(Set.of(bestModule)); setSelectedModules(Set.of(bestModule));
return; return;