mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-29 10:01:35 +00:00
[SDL2] pointer boolean (#8523)
This commit is contained in:
@@ -42,7 +42,7 @@ char *SDL_GetBasePath(void)
|
||||
|
||||
while (SDL_TRUE) {
|
||||
void *ptr = SDL_realloc(path, buflen * sizeof(WCHAR));
|
||||
if (ptr == NULL) {
|
||||
if (!ptr) {
|
||||
SDL_free(path);
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
@@ -99,11 +99,11 @@ char *SDL_GetPrefPath(const char *org, const char *app)
|
||||
size_t new_wpath_len = 0;
|
||||
BOOL api_result = FALSE;
|
||||
|
||||
if (app == NULL) {
|
||||
if (!app) {
|
||||
SDL_InvalidParamError("app");
|
||||
return NULL;
|
||||
}
|
||||
if (org == NULL) {
|
||||
if (!org) {
|
||||
org = "";
|
||||
}
|
||||
|
||||
@@ -113,13 +113,13 @@ char *SDL_GetPrefPath(const char *org, const char *app)
|
||||
}
|
||||
|
||||
worg = WIN_UTF8ToStringW(org);
|
||||
if (worg == NULL) {
|
||||
if (!worg) {
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wapp = WIN_UTF8ToStringW(app);
|
||||
if (wapp == NULL) {
|
||||
if (!wapp) {
|
||||
SDL_free(worg);
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user