mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
fix crash
This commit is contained in:
parent
59210bf718
commit
a663c348d3
@ -426,8 +426,9 @@ p3dobj_to_xml(const P3D_object *obj) {
|
|||||||
// Otherwise, it must a host-provided object, which means we
|
// Otherwise, it must a host-provided object, which means we
|
||||||
// should pass a reference down to this particular object, so
|
// should pass a reference down to this particular object, so
|
||||||
// the Python process knows to call back up to here to query it.
|
// the Python process knows to call back up to here to query it.
|
||||||
// TODO: pass pointers better.
|
// TODO: pass pointers better. Fix this hideous leak.
|
||||||
int object_id = (int)obj;
|
P3D_object *dup = P3D_OBJECT_COPY(obj);
|
||||||
|
int object_id = (int)dup;
|
||||||
xvalue->SetAttribute("type", "browser");
|
xvalue->SetAttribute("type", "browser");
|
||||||
xvalue->SetAttribute("object_id", object_id);
|
xvalue->SetAttribute("object_id", object_id);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user