This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
VM: Resetting pxVmSetGlobalSelf() after a pxVmCallFunction() call throws memory exceptin #7
Labels
bug
Something isn't working
When calling the below VM method, I get a memory exception:
C#
C++
OpenGothic is doing the reset of globalSelf() in a similar fashion, but there's a difference:
The original phoenix implementation uses std::shared_ptr which are never empty. But the C-API leverages the underlying .data() (c_npc*) which can be empty.
Could it be possible to have a null-check within C-API and reset to a default (empty shared_ptr<>()) value? (maybe create a new shared_ptr every time? But is the old one being deleted?)
The text was updated successfully, but these errors were encountered: