Fix potential NULL being passed to printf
This commit is contained in:
parent
0477b1b633
commit
f2950b085b
1 changed files with 4 additions and 1 deletions
|
@ -41,7 +41,10 @@ void Backend_Init(void)
|
|||
for (int i = 0; i < SDL_GetNumVideoDrivers(); ++i)
|
||||
puts(SDL_GetVideoDriver(i));
|
||||
|
||||
printf("Selected SDL2 video driver: %s\n", SDL_GetCurrentVideoDriver());
|
||||
const char *driver = SDL_GetCurrentVideoDriver();
|
||||
|
||||
if (driver != NULL)
|
||||
printf("Selected SDL2 video driver: %s\n", driver);
|
||||
}
|
||||
|
||||
void Backend_Deinit(void)
|
||||
|
|
Loading…
Add table
Reference in a new issue