Skip to content

Commit

Permalink
fix: fix crash when clear ui commands without commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Aug 21, 2024
1 parent 9a02698 commit ca35ee7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bridge/foundation/ui_command_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ bool UICommandBuffer::empty() {
}

void UICommandBuffer::clear() {
if (buffer_ == nullptr) return;
memset(buffer_, 0, sizeof(UICommandItem) * size_);
size_ = 0;
kind_flag = 0;
Expand Down

0 comments on commit ca35ee7

Please sign in to comment.