- // there is not much to do if we have only one child (or not at all) and
- // we're not interested in "notebook page change" events here
- if ( (GetChildren().GetCount() < 2) || event.IsWindowChange() )
+ const wxWindowList& children = GetChildren();
+
+ // there is not much to do if we don't have children and we're not
+ // interested in "notebook page change" events here
+ if ( !children.GetCount() || event.IsWindowChange() )