From e4eb9e04e016c63da10ebeb64fcdb640cfa5b752 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Fri, 17 Mar 2023 03:24:17 +0100 Subject: [PATCH] Fix #105823: Crash While deleting retiming handles Handle index operator property was exposed to user, which was unintended. The property is validated only in invoke function. --- .../space_sequencer/sequencer_retiming.cc | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/source/blender/editors/space_sequencer/sequencer_retiming.cc b/source/blender/editors/space_sequencer/sequencer_retiming.cc index 51f0e87b7f3..89fbba42ea1 100644 --- a/source/blender/editors/space_sequencer/sequencer_retiming.cc +++ b/source/blender/editors/space_sequencer/sequencer_retiming.cc @@ -229,15 +229,16 @@ void SEQUENCER_OT_retiming_handle_move(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_int(ot->srna, - "handle_index", - 0, - 0, - INT_MAX, - "Handle Index", - "Index of handle to be moved", - 0, - INT_MAX); + PropertyRNA *prop = RNA_def_int(ot->srna, + "handle_index", + 0, + 0, + INT_MAX, + "Handle Index", + "Index of handle to be moved", + 0, + INT_MAX); + RNA_def_property_flag(prop, PROP_HIDDEN); } /** \} */ @@ -367,15 +368,16 @@ void SEQUENCER_OT_retiming_handle_remove(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_int(ot->srna, - "handle_index", - 0, - 0, - INT_MAX, - "Handle Index", - "Index of handle to be removed", - 0, - INT_MAX); + PropertyRNA *prop = RNA_def_int(ot->srna, + "handle_index", + 0, + 0, + INT_MAX, + "Handle Index", + "Index of handle to be removed", + 0, + INT_MAX); + RNA_def_property_flag(prop, PROP_HIDDEN); } /** \} */