Skip to content

Commit

Permalink
fix(VirtualObject): more null-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Jan 7, 2024
1 parent a99e5e4 commit 277eb6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
#include "zenkit-capi/Object.h"

ZkObject* ZkObject_takeRef(ZkObject* slf) {
if (slf == nullptr || *slf == nullptr) return nullptr;
return new ZkObject(*slf, slf->get());
}
2 changes: 1 addition & 1 deletion src/vobs/VirtualObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ ZkVisual* ZkVirtualObject_getVisual(ZkVirtualObject const* slf) {
return nullptr;
}

return new ZkVisual(SLF->visual);
return &SLF->visual;
}

ZkVisual* ZkVirtualObject_setVisual(ZkVirtualObject* slf, ZkVisualType visual) {
Expand Down

0 comments on commit 277eb6b

Please sign in to comment.