// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
#include "wx/toolbar.h"
// ----------------------------------------------------------------------------
-// wxWindows macros
+// wxWidgets macros
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
// There is no sense in updating the toolbar UI
// if the parent window is about to get destroyed
- if (GetParent() && wxPendingDelete.Member( GetParent() ))
+ wxWindow *tlw = wxGetTopLevelParent( this );
+ if (tlw && wxPendingDelete.Member( tlw ))
return;
wxEvtHandler* evtHandler = GetEventHandler() ;