Skip to content

Commit

Permalink
null check
Browse files Browse the repository at this point in the history
  • Loading branch information
IamRanjeetSingh committed Aug 16, 2023
1 parent cd7f8a2 commit 07cc27a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ limitations under the License.
using GingerCore.DataSource;
using GingerCore.GeneralLib;
using GingerCore.Helpers;
using NPOI.OpenXmlFormats.Dml;
using System;
using System.Collections.Generic;
using System.Data;
Expand Down Expand Up @@ -1939,6 +1940,11 @@ private void MarkAsDone_Unchecked(object sender, RoutedEventArgs e)

private void cmbDataSourceName_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if(cmbDataSourceName.SelectedValue == null)
{
return;
}

foreach (DataSourceBase ds in mDSList)
{
if (ds.Name == cmbDataSourceName.SelectedValue.ToString())
Expand Down Expand Up @@ -1977,7 +1983,7 @@ private void cmbDataSourceName_SelectionChanged(object sender, SelectionChangedE

private void cmbDataSourceTableName_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (cmbDataSourceTableName == null || cmbDataSourceTableName.Items.Count == 0)
if (cmbDataSourceTableName == null || cmbDataSourceTableName.Items.Count == 0 || cmbDataSourceTableName.SelectedValue == null)
{
return;
}
Expand Down

0 comments on commit 07cc27a

Please sign in to comment.