File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -269,8 +269,13 @@ namespace RTEGUI {
269
269
void GUIEditorApp::PopulateCollectionBoxChildrenList (GUICollectionBox *collectionBox) const {
270
270
m_ControlsInActiveCollectionBoxList->ClearList ();
271
271
272
+ std::vector<GUIControl *> controls = *collectionBox->GetChildren ();
273
+ if (controls.empty ()) {
274
+ return ;
275
+ }
276
+
272
277
// Go through all the top-level (directly under root) controls and add only the CollectionBoxes to the list here
273
- for (GUIControl *control : *collectionBox-> GetChildren () ) {
278
+ for (GUIControl *control : controls ) {
274
279
m_ControlsInActiveCollectionBoxList->AddItem (control->GetName ());
275
280
// Check if this is selected in the editor, and if so, select it in the list too
276
281
if (collectionBox == m_SelectionInfo.Control ) { m_ControlsInActiveCollectionBoxList->SetSelectedIndex (m_CollectionBoxList->GetItemList ()->size () - 1 ); }
You can’t perform that action at this time.
0 commit comments