Hi, there are different results between Debug and Release Version in the following code. I want to the reason. Why ?

void CMyListview::OnClick(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;

CString itemText = pListCtrl->GetItemText(pNMListView->iItem, 0) ;

if ( !itemText.IsEmpty())
{
LVITEM lvitem ;
lvitem.mask = LVIF_TEXT | LVIF_IMAGE | LVIS_SELECTED ;
lvitem.iItem = pNMListView->iItem ;
lvitem.iSubItem = 0 ;
lvitem.stateMask = LVIS_SELECTED ;
if ( pListCtrl->GetItem( &lvitem ))
{
// Never run to here in Debug Version. Why ?
}
}

*pResult = 0;
}