From 73b93c9110ec853e12bcde1a26305bd96ed801d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Date: Thu, 9 Jun 2016 19:09:59 +0200 Subject: 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. --- tools/editor/asset_library_editor_plugin.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'tools/editor') diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp index 0b16ca9545..928acdbcbb 100644 --- a/tools/editor/asset_library_editor_plugin.cpp +++ b/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); -- cgit v1.2.3