From 92cf7574d7153febcd99e47fcdd84ef7ba4b8b9e Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Wed, 25 Mar 2026 12:00:15 +0100 Subject: [PATCH] Exception falls Settings nicht gefunden wird - Darf nicht passieren --- BeWo/AI/Controls/VoiceToTextButtonControl.xaml.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BeWo/AI/Controls/VoiceToTextButtonControl.xaml.cs b/BeWo/AI/Controls/VoiceToTextButtonControl.xaml.cs index 3d4a4c028..3a1ee0dc7 100644 --- a/BeWo/AI/Controls/VoiceToTextButtonControl.xaml.cs +++ b/BeWo/AI/Controls/VoiceToTextButtonControl.xaml.cs @@ -77,12 +77,14 @@ namespace BeWo.AI.Controls var settings = serviceRecordList.AiUserSetting; + if (settings is null) + throw new NotImplementedException("Can't find DataContext (settings)"); + view.DataContext = settings; var factory = new BeWoWindowFactory(); var beWoWindow = factory.GetAnimatedBeWoWindow(Translator.Translate("BeWoPlaner"), view, 500, 600); - view.ApplyClicked += (s, e) => { if (TargetTextBox != null)