From 2ad67b6cf7d4fc9511e092a09e42bf3540bbe9ee Mon Sep 17 00:00:00 2001 From: achavis Date: Tue, 15 Nov 2022 09:59:51 -0700 Subject: [PATCH] Modify BulkPurge to handle Topic with no Subscriptions --- src/ServiceBusExplorer/Forms/MainForm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceBusExplorer/Forms/MainForm.cs b/src/ServiceBusExplorer/Forms/MainForm.cs index cc35bbf2..8b5710a4 100644 --- a/src/ServiceBusExplorer/Forms/MainForm.cs +++ b/src/ServiceBusExplorer/Forms/MainForm.cs @@ -6714,7 +6714,7 @@ private async Task BulkPurge(TreeNode treeNode, PurgeStrategies bulkPurgeStrateg } List subscriptions = new List(); - Func> subscriptionsExtractor = tn => tn.FirstNode.Nodes.Cast().Select(n => n.Tag as SubscriptionWrapper); + Func> subscriptionsExtractor = tn => tn.FirstNode?.Nodes.Cast().Select(n => n.Tag as SubscriptionWrapper) ?? Enumerable.Empty(); List queues = new List();