Skip to content

Commit ddaadd8

Browse files
committed
debugger: if controller has been disposed, leave showScriptLocation early
1 parent 4362d64 commit ddaadd8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/devtools_app/lib/src/screens/debugger/codeview_controller.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ class CodeViewController extends DisposableController
218218
);
219219

220220
if (succeeded) {
221+
// The controller may have been disposed while awaiting the asynchronous
222+
// location display setup.
223+
if (disposed) return;
221224
// Update the scripts history (and make sure we don't react to the
222225
// subsequent event).
223226
scriptsHistory.current.removeListener(_scriptHistoryListener);

0 commit comments

Comments
 (0)