Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gui: PythonWrapper: Do not steal reference (fixes #12542) #12576

Merged
merged 1 commit into from Feb 24, 2024

Conversation

3x380V
Copy link
Contributor

@3x380V 3x380V commented Feb 23, 2024

Foreign Python objects needs to be passed as Py::Object(). Py::asObject() is stealing reference and object might be garbage collected even before dereferenced. Problem didn't show in the original code because methods Py::asObject() was used in were never called.

Fixes: ac6f991 (Gui: Consolidate Python -> Qt class conversion)

Foreign Python objects needs to be passed as Py::Object().
Py::asObject() is stealing reference and object might be garbage
collected even before dereferenced. Problem didn't show in the
original code because methods Py::asObject() was used in were
never called.

Fixes: ac6f991 (Gui: Consolidate Python -> Qt class conversion)
@github-actions github-actions bot added the Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Feb 23, 2024
@wwmayer wwmayer merged commit 967633e into FreeCAD:main Feb 24, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants