Hello folks

I have a simple question regarding pointers. I have a programe which should make some of the items of a qlistview bold. I have declared a pointer to the class where i have functions who can distinguish which items should be bold. But the crashes on that pointer.

Here is my code

Qt Code:
  1. pItem->bold = false;
  2.  
  3. if (pItem->m_pHL)
  4. {
  5.  
  6. // programe crashes here if (pItem->m_pHL->STestt()->IsTested())
  7. {
  8. pItem->bold = true;
  9. pItem->setOpen(true);
  10. }
  11.  
  12. QListViewItem *p = pItem->parent();
  13.  
  14. while(p)
  15. {
  16. ((CTestViewItem*)p)->bold = true;
  17. p = p->parent();
  18.  
  19. }
  20. }
To copy to clipboard, switch view to plain text mode 

and this the declaration of the pointer

Qt Code:
  1. CHL m_pHL;
To copy to clipboard, switch view to plain text mode 

Can someone tell what i am doing wrong?