I have a simple diaglog app (MFC) that is calcualting cost based on two listbox controls. However if one or both items are not selected I get an assertion error, "Expression:nLength>=0". I would like to prompt the user if he forgets to select an item in each list but I can't figure out how to do it. I tried to look at the CList member functions but don't know which one

the code below is how I assign the item selected in the listbox to a CEdit control to show the user what he selected.
m_Home.GetText(m_Home.GetCurSel(), m_Hsel);

Any help would be appreciated!