From ab49047604be03e35b084d8f03e816dfaa2af092 Mon Sep 17 00:00:00 2001 From: Malcolm Anderson Date: Sat, 8 Nov 2025 12:17:35 -0800 Subject: [PATCH] Add error message to Quick Open dialog if callback is invalid --- editor/gui/editor_quick_open_dialog.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/editor/gui/editor_quick_open_dialog.cpp b/editor/gui/editor_quick_open_dialog.cpp index 32346b0f9ba..4a1481e5f49 100644 --- a/editor/gui/editor_quick_open_dialog.cpp +++ b/editor/gui/editor_quick_open_dialog.cpp @@ -252,6 +252,15 @@ void EditorQuickOpenDialog::update_property() { property_object->set(property_path, initial_property_value); } } + + if (!item_selected_callback.is_valid()) { + String err_msg = "The callback provided to the Quick Open dialog was invalid."; + if (_is_instant_preview_active()) { + err_msg += " Try disabling \"Instant Preview\" as a workaround."; + } + ERR_FAIL_MSG(err_msg); + } + item_selected_callback.call(container->get_selected()); }