Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-11-11 00:43:18 +0300
committerHans Goudey <h.goudey@me.com>2021-11-11 00:43:18 +0300
commit22ffd69a91c9287e4f61e620ec2beaf9b1ff22c1 (patch)
treef35d8137527fa5f1c65b550d9d1003dc7e6a378b /source/blender/editors
parent040630bb9a634988f45fd9f8e480f39c195ec57b (diff)
Fix T89313: Attribute search crash with animation playback
rBc473b2ce8bdbf8fa42 improved the situation somewhat, but attribute search still crashes during animation playback, because the UI search data references stale memory. The proper solution is to allow the search to own data rather than just referencing it, but I would prefer not to do that for 3.0. In the meantime, just disable attribute search when animation is playing. Differential Revision: https://developer.blender.org/D13179
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_node/node_geometry_attribute_search.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_geometry_attribute_search.cc b/source/blender/editors/space_node/node_geometry_attribute_search.cc
index d0ccbb03107..063e6348123 100644
--- a/source/blender/editors/space_node/node_geometry_attribute_search.cc
+++ b/source/blender/editors/space_node/node_geometry_attribute_search.cc
@@ -33,6 +33,7 @@
#include "RNA_access.h"
#include "RNA_enum_types.h"
+#include "ED_screen.h"
#include "ED_undo.h"
#include "BLT_translation.h"
@@ -64,6 +65,10 @@ BLI_STATIC_ASSERT(std::is_trivially_destructible_v<AttributeSearchData>, "");
static void attribute_search_update_fn(
const bContext *C, void *arg, const char *str, uiSearchItems *items, const bool is_first)
{
+ if (ED_screen_animation_playing(CTX_wm_manager(C))) {
+ return;
+ }
+
AttributeSearchData *data = static_cast<AttributeSearchData *>(arg);
SpaceNode *snode = CTX_wm_space_node(C);
@@ -79,6 +84,9 @@ static void attribute_search_update_fn(
static void attribute_search_exec_fn(bContext *C, void *data_v, void *item_v)
{
+ if (ED_screen_animation_playing(CTX_wm_manager(C))) {
+ return;
+ }
if (item_v == nullptr) {
return;
}