From 2b01bbd73c944a01aba5062519b3b4009b7335c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Fri, 10 Oct 2025 15:28:51 +0200 Subject: [PATCH] Fix #147752: Button swap is missing custom tooltip callbacks Tooltips could crash where callbacks receive the wrong argument. This is because the swap function was missing the `custom_tip_func` callback, but was swapping the callback argument. Pull Request: https://projects.blender.org/blender/blender/pulls/147806 --- source/blender/editors/interface/interface.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc index 70030171476..8221aef90eb 100644 --- a/source/blender/editors/interface/interface.cc +++ b/source/blender/editors/interface/interface.cc @@ -972,6 +972,7 @@ static void ui_but_update_old_active_from_new(uiBut *oldbut, uiBut *but) /* Move tooltip from new to old. */ std::swap(oldbut->tip_func, but->tip_func); std::swap(oldbut->tip_arg, but->tip_arg); + std::swap(oldbut->tip_custom_func, but->tip_custom_func); std::swap(oldbut->tip_arg_free, but->tip_arg_free); std::swap(oldbut->tip_quick_func, but->tip_quick_func);