Closed heinerlohmann closed 2 months ago
Hello, The following code in BlueprintAssistBlueprintActions.cpp assumes that any Editor for an Asset derived from UBlueprint must be an FBlueprintEditor.
BlueprintAssistBlueprintActions.cpp
bool FBABlueprintActionsBase::HasOpenBlueprintEditor() const { FBlueprintEditor* BPEditor = FBAMiscUtils::GetEditorFromActiveTabCasted<UBlueprint, FBlueprintEditor>(); return BPEditor != nullptr && BPEditor->InEditingMode(); }
This is unsafe and BPEditor->InEditingMode() will crash the Application if it's not the case. Could you maybe change the code to this?
BPEditor->InEditingMode()
bool FBABlueprintActionsBase::HasOpenBlueprintEditor() const { FBlueprintEditor* BPEditor = FBAMiscUtils::GetEditorFromActiveTabCasted<UBlueprint, FBlueprintEditor>(); return BPEditor != nullptr && BPEditor->IsBlueprintEditor() && BPEditor->InEditingMode(); }
That way it should be safe and not crash anymore for my custom Assets that are technically UBlueprints but do not use an FBlueprintEditor.
Thank you so much for the good work, I can't imagine working on BPs without your plugin anymore! Best regards, Heiner
Hi @heinerlohmann, will add this to the next update👍
Awesome, thanks! 👍
Added in https://github.com/fpwong/BlueprintAssistWiki/releases/tag/4.2.19
Hello, The following code in
BlueprintAssistBlueprintActions.cpp
assumes that any Editor for an Asset derived from UBlueprint must be an FBlueprintEditor.This is unsafe and
BPEditor->InEditingMode()
will crash the Application if it's not the case. Could you maybe change the code to this?That way it should be safe and not crash anymore for my custom Assets that are technically UBlueprints but do not use an FBlueprintEditor.
Thank you so much for the good work, I can't imagine working on BPs without your plugin anymore! Best regards, Heiner