Skip to content

Commit

Permalink
Merge pull request #179 from caiiiycuk/html5
Browse files Browse the repository at this point in the history
Fix mistmatch new/delete from asan report
  • Loading branch information
IonAgorria authored Dec 10, 2024
2 parents c7631f3 + cd81e88 commit 3409054
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 3409054

Please sign in to comment.