From 5f29524ac8715d071e184a3d4ed216e6aabda1a4 Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Mon, 23 Sep 2024 22:07:23 +0700 Subject: [PATCH] fix: crash on downloads page --- MusicX/Controls/QueueTrackControl.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MusicX/Controls/QueueTrackControl.xaml.cs b/MusicX/Controls/QueueTrackControl.xaml.cs index 99608c47..c787783b 100644 --- a/MusicX/Controls/QueueTrackControl.xaml.cs +++ b/MusicX/Controls/QueueTrackControl.xaml.cs @@ -46,7 +46,7 @@ public bool IsCurrentlyPlaying } private int IndexInItemsControl => - ItemContainerGeneratorIndexHook.GetItemContainerIndex(((FrameworkElement)TemplatedParent).TemplatedParent); + ItemContainerGeneratorIndexHook.GetItemContainerIndex(((FrameworkElement)TemplatedParent).TemplatedParent ?? TemplatedParent); public QueueTrackControl() {