Skip to content

Commit

Permalink
Fix DmdDevice crash on close
Browse files Browse the repository at this point in the history
  • Loading branch information
vbousquet committed Nov 21, 2024
1 parent f6aa24c commit 03144d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/win32com/ControllerDmdDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ extern "C" void dmddeviceDeInit() {
if (dmd_hasDMD && dmdDevices[i].Render_4_Shades) {
UINT8* tmpbuffer = (UINT8*)malloc(dmd_width * dmd_height);
memset(tmpbuffer, 0x00, dmd_width * dmd_height);
for (int i = 0; i < 2; i++)
dmdDevices[i].Render_4_Shades(dmd_width, dmd_height, tmpbuffer); //clear screen
dmdDevices[i].Render_4_Shades(dmd_width, dmd_height, tmpbuffer); //clear screen
free(tmpbuffer);
}
if (dmdDevices[i].Close)
Expand Down

0 comments on commit 03144d4

Please sign in to comment.