mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-29 02:34:23 +00:00
Fix property cleanup callback not being called on error (#9663)
The documentation for `SDL_SetPropertyWithCleanup` mentions that the cleanup function is called upon failure. But this wasn't working in the code.
This commit is contained in:
@@ -293,7 +293,7 @@ static int properties_testCleanup(void *arg)
|
||||
SDLTest_AssertPass("Call to SDL_SetProperty(cleanup)");
|
||||
count = 0;
|
||||
SDL_SetPropertyWithCleanup(props, "a", "0", cleanup, &count);
|
||||
SDL_SetPropertyWithCleanup(props, "a", NULL, cleanup, &count);
|
||||
SDL_ClearProperty(props, "a");
|
||||
SDLTest_AssertCheck(count == 1,
|
||||
"Verify cleanup for deleting property, got %d, expected 1", count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user