FlowGraph icon indicating copy to clipboard operation
FlowGraph copied to clipboard

Fix crash in UFlowNode_CallOwnerFunction

Open MaksymKapelianovych opened this issue 1 year ago • 2 comments

Add RequiredParamsClass validation to prevent crash in UFlowNode_CallOwnerFunction (with valid non-empty function ref) when user change owner class to default and then press Refresh

MaksymKapelianovych avatar Mar 27 '24 07:03 MaksymKapelianovych

I decided not to set Params to nullptr, because we still have non-empty function name, and it would require to clear it as well. If user decides to set valid owner class back, function info for node will be lost, and user will need to set it back manually. Undo can help to revert changes, but there is a chance that some other nodes will be already modified until user notice and reverting all that work just to restore function info is not very convenient.

MaksymKapelianovych avatar Mar 27 '24 08:03 MaksymKapelianovych

Steps to reproduce:

  1. Set Expected Owner Class to some class, that contains function with correct signature for UFlowNode_CallOwnerFunction (let's call it Function1)
  2. Add UFlowNode_CallOwnerFunction to graph and set its parameter Function to Function1
  3. Change Expected Owner Class to some class, that does not contain Function1
  4. Click Refresh

MaksymKapelianovych avatar Mar 28 '24 17:03 MaksymKapelianovych

Accepted, thanks for this! :)

MothDoctor avatar Apr 25 '24 18:04 MothDoctor