X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..c92ad09968b09fe6e4cf17d9e962b51b7caaee91:/src/gtk1/tbargtk.cpp diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index a6920de7f9..555803cd80 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -428,15 +428,16 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) { wxToolBarToolsList::compatibility_iterator node = wxToolBarToolsList::compatibility_iterator(); - if ( pos ) node = m_tools.Item(pos - 1); + if ( pos ) + node = m_tools.Item(pos - 1); while ( node ) { - wxToolBarTool *tool = (wxToolBarTool *)node->GetData(); - if ( !tool->IsRadio() ) + wxToolBarTool *toolNext = (wxToolBarTool *)node->GetData(); + if ( !toolNext->IsRadio() ) break; - widget = tool->m_item; + widget = toolNext->m_item; node = node->GetPrevious(); }