Skip to content

Commit

Permalink
Fix mistmatch new/delete from asan report
Browse files Browse the repository at this point in the history
  • Loading branch information
caiiiycuk committed Dec 9, 2024
1 parent c7631f3 commit cd81e88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Render/sokol/SokolRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,11 +550,11 @@ void cSokolRender::ClearPipelines() {

void cSokolRender::SetCommandViewportClip(bool replace) {
if (activeCommand.viewport && replace) {
free(activeCommand.viewport);
delete[] activeCommand.viewport;
activeCommand.viewport = nullptr;
}
if (activeCommand.clip && replace) {
free(activeCommand.clip);
delete[] activeCommand.clip;
activeCommand.clip = nullptr;
}
if (!activeCommand.viewport) {
Expand Down Expand Up @@ -732,11 +732,11 @@ void SokolCommand::CreateShaderParams() {

void SokolCommand::ClearDrawData() {
if (viewport) {
delete viewport;
delete[] viewport;
viewport = nullptr;
}
if (clip) {
delete clip;
delete[] clip;
clip = nullptr;
}
if (pass_action) {
Expand Down

0 comments on commit cd81e88

Please sign in to comment.