1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

Add error message to Quick Open dialog if callback is invalid

This commit is contained in:
Malcolm Anderson
2025-11-08 12:17:35 -08:00
parent 6fd949a6dc
commit ab49047604

View File

@@ -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());
}