File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ type CustomActionArg struct {
3939 CurrentTaskName string
4040 CustomActionName string
4141 CustomActionParam string
42+ // RecognitionDetail may be nil when the custom action runs on an action-only
43+ // node (e.g. invoked via Context.RunAction), where reco_id is invalid.
4244 RecognitionDetail * RecognitionDetail
4345 Box Rect
4446}
@@ -78,10 +80,7 @@ func _MaaCustomActionCallbackAgent(
7880
7981 ctx := & Context {handle : context }
8082 tasker := ctx .GetTasker ()
81- // recoId is invalid (0) when the custom action runs on an action-only node
82- // (e.g. invoked via Context.RunAction). Querying recognition detail with an
83- // invalid id makes the framework log a spurious error, so skip it and leave
84- // RecognitionDetail nil in that case.
83+ // Skip GetRecognitionDetail for invalid recoId to avoid a spurious framework error log.
8584 var recognitionDetail * RecognitionDetail
8685 if recoId != 0 {
8786 var err error
You can’t perform that action at this time.
0 commit comments