More sanity checks for argument strings

It just doesn't want to behave at all.
Thanks BPSpike for reporting this edge case!
This commit is contained in:
Kurt
2015-04-25 00:35:22 -07:00
parent fa20293dbb
commit 7727ea23f6

View File

@@ -388,7 +388,7 @@ private string getMemoryString(ComboBox m, ComboBox arg, ComboBox q, ComboBox f,
{
string result = "";
string nn = m_parent.TB_Nickname.Text;
string a = ((Util.cbItem)(arg.SelectedItem)).Text;
string a = ((Util.cbItem)(arg.SelectedItem) == null) ? arg.Text ?? "ERROR" : ((Util.cbItem)(arg.SelectedItem)).Text;
int mem = Util.getIndex(m);
bool enabled = false;