Skip to content

Commit

Permalink
Prevent null reference exception on theme change (#220)
Browse files Browse the repository at this point in the history
## Test plan
Try changing the VS theme when loading the extension
<!-- REQUIRED; info at
https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles
-->

Co-authored-by: Tomasz Gołębiowski <tgolebiowski@virtuslab.com>
  • Loading branch information
tomaszgolebiowski and Tomasz Gołębiowski authored Feb 6, 2025
1 parent 560cd75 commit ce7513d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Cody.UI/Controls/WebviewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public async void OnThemeChanged(object sender, IColorThemeChangedEvent e)
{
try
{
if (_webview == null) return;
string updatedScript = e.ThemingScript;
if (updatedScript != _colorThemeScript)
{
Expand Down

0 comments on commit ce7513d

Please sign in to comment.