From 4b08c0b56b4a9bea25aac704b48f18037b7cff26 Mon Sep 17 00:00:00 2001 From: Alekhya Reddy Date: Mon, 6 Apr 2020 15:52:19 -0700 Subject: [PATCH] To avoid DBNull to String typecast exception --- .../Wox.Plugin.Indexer/SearchHelper/WindowsSearchAPI.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/launcher/Plugins/Wox.Plugin.Indexer/SearchHelper/WindowsSearchAPI.cs b/src/modules/launcher/Plugins/Wox.Plugin.Indexer/SearchHelper/WindowsSearchAPI.cs index fb7b6ffcd1..8731155a45 100644 --- a/src/modules/launcher/Plugins/Wox.Plugin.Indexer/SearchHelper/WindowsSearchAPI.cs +++ b/src/modules/launcher/Plugins/Wox.Plugin.Indexer/SearchHelper/WindowsSearchAPI.cs @@ -31,8 +31,7 @@ namespace Wox.Plugin.Indexer.SearchHelper { while (WDSResults.Read()) { - // col 0 is our path in display format - if (WDSResults.GetString(0) != null) + if (!Convert.IsDBNull(WDSResults[0])) { var result = new SearchResult { Path = WDSResults.GetString(0) }; yield return result;