To avoid DBNull to String typecast exception

This commit is contained in:
Alekhya Reddy
2020-04-06 15:52:19 -07:00
parent b9e437c6cd
commit 4b08c0b56b

View File

@@ -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;