Skip to content

Commit

Permalink
Merge pull request #841 from sh-dave/g5-fix-indexbuffer-destroy
Browse files Browse the repository at this point in the history
null check impl.index_buffer
  • Loading branch information
RobDangerous authored Jan 24, 2024
2 parents c308de9 + 008409a commit 70b5772
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,13 @@ void kinc_g5_index_buffer_init(kinc_g5_index_buffer_t *buffer, int count, kinc_g
}

void kinc_g5_index_buffer_destroy(kinc_g5_index_buffer_t *buffer) {
buffer->impl.index_buffer->Release();
if (buffer->impl.index_buffer != NULL) {
buffer->impl.index_buffer->Release();
buffer->impl.index_buffer = NULL;
}

buffer->impl.upload_buffer->Release();
buffer->impl.upload_buffer = NULL;
}

static int kinc_g5_internal_index_buffer_stride(kinc_g5_index_buffer_t *buffer) {
Expand Down

0 comments on commit 70b5772

Please sign in to comment.