Merge pull request #112559 from Meorge/bugfix/need-valid-callable-instant-preview

Add error message to Quick Open dialog if callback is invalid
This commit is contained in:
Rémi Verschelde
2025-11-27 09:55:40 +01:00

View File

@ -254,6 +254,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());
}