Skip to content

Commit

Permalink
fix(VirtualObject): null-check visual before return
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Jan 7, 2024
1 parent 95de244 commit a99e5e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vobs/VirtualObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ void ZkVirtualObject_setName(ZkVirtualObject* slf, ZkString name) {
ZkVisual* ZkVirtualObject_getVisual(ZkVirtualObject const* slf) {
ZKC_TRACE_FN();
ZKC_CHECK_NULL(slf);

if (!SLF->visual) {
return nullptr;
}

return new ZkVisual(SLF->visual);
}

Expand Down

0 comments on commit a99e5e4

Please sign in to comment.