Browse Source

EditorAssetLibrary: Don't call add_child() on uninitialized pointer

Fixes possible crash and fixes crash when using undefined sanitizer.
The "search_hb" is already added into "library_main" container.
Błażej Szczygieł 9 years ago
parent
commit
73b93c9110
1 changed files with 0 additions and 2 deletions
  1. 0 2
      tools/editor/asset_library_editor_plugin.cpp

+ 0 - 2
tools/editor/asset_library_editor_plugin.cpp

@@ -1282,8 +1282,6 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
 	}
 
 
-	library_vb->add_child(search_hb);
-
 	HBoxContainer *search_hb2 = memnew( HBoxContainer );
 	library_main->add_child(search_hb2);