Skip to content

Commit 75d370c

Browse files
committed
Fix potential npe
Related to microsoft#53830
1 parent ba9c869 commit 75d370c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/vs/editor/contrib/codeAction/codeActionCommands.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ export class QuickFixController implements IEditorContribution {
122122
}
123123

124124
private _handleLightBulbSelect(coords: { x: number, y: number }): void {
125-
this._codeActionContextMenu.show(this._lightBulbWidget.model.actions, coords);
125+
if (this._lightBulbWidget.model.actions) {
126+
this._codeActionContextMenu.show(this._lightBulbWidget.model.actions, coords);
127+
}
126128
}
127129

128130
public triggerFromEditorSelection(filter?: CodeActionFilter, autoApply?: CodeActionAutoApply): Thenable<CodeAction[] | undefined> {

0 commit comments

Comments
 (0)