fixed crash on startup under GTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
246428310e
commit
e4a8a17202
@ -329,15 +329,18 @@ void MyFrame::TogStyle(int id, long flag)
|
||||
void MyFrame::OnIdle(wxIdleEvent& event)
|
||||
{
|
||||
#if wxUSE_STATUSBAR
|
||||
wxTreeItemId idRoot = m_treeCtrl->GetRootItem();
|
||||
if ( m_treeCtrl )
|
||||
{
|
||||
wxTreeItemId idRoot = m_treeCtrl->GetRootItem();
|
||||
|
||||
SetStatusText(wxString::Format
|
||||
(
|
||||
_T("Root/last item is %svisible/%svisible"),
|
||||
m_treeCtrl->IsVisible(idRoot) ? _T("") : _T("not "),
|
||||
m_treeCtrl->IsVisible(m_treeCtrl->GetLastChild(idRoot))
|
||||
? _T("") : _T("not ")
|
||||
), 1);
|
||||
SetStatusText(wxString::Format
|
||||
(
|
||||
_T("Root/last item is %svisible/%svisible"),
|
||||
m_treeCtrl->IsVisible(idRoot) ? _T("") : _T("not "),
|
||||
m_treeCtrl->IsVisible(m_treeCtrl->GetLastChild(idRoot))
|
||||
? _T("") : _T("not ")
|
||||
), 1);
|
||||
}
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
event.Skip();
|
||||
|
Loading…
Reference in New Issue
Block a user