Skip to content

Commit 6230410

Browse files
committed
Check return values, especially in test cases
1 parent 7aa207b commit 6230410

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/testgpu_spinning_cube.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,15 @@ init_render_state(int msaa)
473473
/* Claim the windows */
474474

475475
for (i = 0; i < state->num_windows; i++) {
476-
SDL_GpuClaimWindow(
476+
if (!SDL_GpuClaimWindow(
477477
gpu_device,
478478
state->windows[i],
479479
SDL_GPU_SWAPCHAINCOMPOSITION_SDR,
480480
SDL_GPU_PRESENTMODE_VSYNC
481-
);
481+
)) {
482+
SDL_Log("GpuClaimWindow failed");
483+
quit(2);
484+
}
482485
}
483486

484487
/* Create shaders */

0 commit comments

Comments
 (0)