C# 未将对象引用设置到对象的实例

C#初学者,今天做项目的时候遇到“未将对象引用设置到对象的实例”

try
{
    ComboBox statusComboBoxColumn = sender as ComboBox;
    object preStatus = chulaigaodgv.CurrentRow.Cells[4].Value;
    string preStatusValue = (preStatus == null) ? string.Empty : preStatus.ToString();
    string selectedStatusValue = statusComboBoxColumn.GetItemText(statusComboBoxColumn.Items[statusComboBoxColumn.SelectedIndex]);
     if (preStatusValue != selectedStatusValue)
     {
         DataGridViewComboBoxCell comboCell = new DataGridViewComboBoxCell();
         comboCell = (DataGridViewComboBoxCell)chulaigaodgv.CurrentRow.Cells[5];
         comboCell.Value = "";
     }
}
catch(Exception ex)
{
    MessageBox.Show(ex.Message);
}

贴上代码

combobox没有选中项吧

麻烦大佬指点一下

程序第六行报错未将对象引用设置到对象的实例

你可以下个断点呀

加个断点看下数据是不是对的

今天加了断点看了一下,在程序第六行中,statusComboBoxColumn.SelectedIndex引发了类型“System.NullReferenceException”的异常