Skip to content

Commit

Permalink
Return early if null
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Aug 28, 2024
1 parent 3d1ddc1 commit 93e1fd3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions TwitchDownloaderWPF/WindowSettings.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ private void FileNameParameter_MouseDown(object sender, MouseButtonEventArgs e)

var focusedElement = Keyboard.FocusedElement;
var textBox = GetTemplateTextBox(focusedElement);

if (textBox is null)
return;

if (textBox.TryInsertAtCaret(parameter))
{
e.Handled = true;
Expand Down

0 comments on commit 93e1fd3

Please sign in to comment.