- // if we hadn't had a header before but have one now
- // then we need to relayout the window
- // if ( GetColumnCount() == 1 && m_mainWin->HasHeader() )
-
- m_headerWin->Refresh();
+ // NOTE: if wxLC_NO_HEADER was given, then we are in report view mode but
+ // still have m_headerWin==NULL
+ if (m_headerWin)
+ m_headerWin->Refresh();