mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-30 12:21:58 +00:00
[SDL2] pointer boolean (#8523)
This commit is contained in:
@@ -211,7 +211,7 @@ int SDL_BlendFillRect(SDL_Surface *dst, const SDL_Rect *rect,
|
||||
{
|
||||
SDL_Rect clipped;
|
||||
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return SDL_InvalidParamError("SDL_BlendFillRect(): dst");
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ int SDL_BlendFillRects(SDL_Surface *dst, const SDL_Rect *rects, int count,
|
||||
SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) = NULL;
|
||||
int status = 0;
|
||||
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return SDL_InvalidParamError("SDL_BlendFillRects(): dst");
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ int SDL_BlendFillRects(SDL_Surface *dst, const SDL_Rect *rects, int count,
|
||||
break;
|
||||
}
|
||||
|
||||
if (func == NULL) {
|
||||
if (!func) {
|
||||
if (!dst->format->Amask) {
|
||||
func = SDL_BlendFillRect_RGB;
|
||||
} else {
|
||||
|
||||
@@ -798,12 +798,12 @@ int SDL_BlendLine(SDL_Surface *dst, int x1, int y1, int x2, int y2,
|
||||
{
|
||||
BlendLineFunc func;
|
||||
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return SDL_InvalidParamError("SDL_BlendLine(): dst");
|
||||
}
|
||||
|
||||
func = SDL_CalculateBlendLineFunc(dst->format);
|
||||
if (func == NULL) {
|
||||
if (!func) {
|
||||
return SDL_SetError("SDL_BlendLine(): Unsupported surface format");
|
||||
}
|
||||
|
||||
@@ -826,12 +826,12 @@ int SDL_BlendLines(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||
SDL_bool draw_end;
|
||||
BlendLineFunc func;
|
||||
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return SDL_SetError("SDL_BlendLines(): Passed NULL destination surface");
|
||||
}
|
||||
|
||||
func = SDL_CalculateBlendLineFunc(dst->format);
|
||||
if (func == NULL) {
|
||||
if (!func) {
|
||||
return SDL_SetError("SDL_BlendLines(): Unsupported surface format");
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ static int SDL_BlendPoint_RGBA(SDL_Surface *dst, int x, int y, SDL_BlendMode ble
|
||||
int SDL_BlendPoint(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, Uint8 r,
|
||||
Uint8 g, Uint8 b, Uint8 a)
|
||||
{
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return SDL_InvalidParamError("SDL_BlendPoint(): dst");
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ int SDL_BlendPoints(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||
SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) = NULL;
|
||||
int status = 0;
|
||||
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return SDL_InvalidParamError("SDL_BlendPoints(): dst");
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ int SDL_BlendPoints(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||
break;
|
||||
}
|
||||
|
||||
if (func == NULL) {
|
||||
if (!func) {
|
||||
if (!dst->format->Amask) {
|
||||
func = SDL_BlendPoint_RGB;
|
||||
} else {
|
||||
|
||||
@@ -137,12 +137,12 @@ int SDL_DrawLine(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint32 color)
|
||||
{
|
||||
DrawLineFunc func;
|
||||
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return SDL_InvalidParamError("SDL_DrawLine(): dst");
|
||||
}
|
||||
|
||||
func = SDL_CalculateDrawLineFunc(dst->format);
|
||||
if (func == NULL) {
|
||||
if (!func) {
|
||||
return SDL_SetError("SDL_DrawLine(): Unsupported surface format");
|
||||
}
|
||||
|
||||
@@ -165,12 +165,12 @@ int SDL_DrawLines(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||
SDL_bool draw_end;
|
||||
DrawLineFunc func;
|
||||
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return SDL_InvalidParamError("SDL_DrawLines(): dst");
|
||||
}
|
||||
|
||||
func = SDL_CalculateDrawLineFunc(dst->format);
|
||||
if (func == NULL) {
|
||||
if (!func) {
|
||||
return SDL_SetError("SDL_DrawLines(): Unsupported surface format");
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
int SDL_DrawPoint(SDL_Surface *dst, int x, int y, Uint32 color)
|
||||
{
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return SDL_InvalidParamError("SDL_DrawPoint(): dst");
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ int SDL_DrawPoints(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||
int i;
|
||||
int x, y;
|
||||
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return SDL_InvalidParamError("SDL_DrawPoints(): dst");
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ static int SW_QueueDrawPoints(SDL_Renderer *renderer, SDL_RenderCommand *cmd, co
|
||||
SDL_Point *verts = (SDL_Point *)SDL_AllocateRenderVertices(renderer, count * sizeof(SDL_Point), 0, &cmd->data.draw.first);
|
||||
int i;
|
||||
|
||||
if (verts == NULL) {
|
||||
if (!verts) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ static int SW_QueueFillRects(SDL_Renderer *renderer, SDL_RenderCommand *cmd, con
|
||||
SDL_Rect *verts = (SDL_Rect *)SDL_AllocateRenderVertices(renderer, count * sizeof(SDL_Rect), 0, &cmd->data.draw.first);
|
||||
int i;
|
||||
|
||||
if (verts == NULL) {
|
||||
if (!verts) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ static int SW_QueueCopy(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Text
|
||||
{
|
||||
SDL_Rect *verts = (SDL_Rect *)SDL_AllocateRenderVertices(renderer, 2 * sizeof(SDL_Rect), 0, &cmd->data.draw.first);
|
||||
|
||||
if (verts == NULL) {
|
||||
if (!verts) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ static int SW_QueueCopyEx(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Te
|
||||
{
|
||||
CopyExData *verts = (CopyExData *)SDL_AllocateRenderVertices(renderer, sizeof(CopyExData), 0, &cmd->data.draw.first);
|
||||
|
||||
if (verts == NULL) {
|
||||
if (!verts) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ static int SW_RenderCopyEx(SDL_Renderer *renderer, SDL_Surface *surface, SDL_Tex
|
||||
int blitRequired = SDL_FALSE;
|
||||
int isOpaque = SDL_FALSE;
|
||||
|
||||
if (surface == NULL) {
|
||||
if (!surface) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ static int SW_RenderCopyEx(SDL_Renderer *renderer, SDL_Surface *surface, SDL_Tex
|
||||
src_clone = SDL_CreateRGBSurfaceFrom(src->pixels, src->w, src->h, src->format->BitsPerPixel, src->pitch,
|
||||
src->format->Rmask, src->format->Gmask,
|
||||
src->format->Bmask, src->format->Amask);
|
||||
if (src_clone == NULL) {
|
||||
if (!src_clone) {
|
||||
if (SDL_MUSTLOCK(src)) {
|
||||
SDL_UnlockSurface(src);
|
||||
}
|
||||
@@ -390,7 +390,7 @@ static int SW_RenderCopyEx(SDL_Renderer *renderer, SDL_Surface *surface, SDL_Tex
|
||||
if (blendmode == SDL_BLENDMODE_NONE && !isOpaque) {
|
||||
mask = SDL_CreateRGBSurface(0, final_rect->w, final_rect->h, 32,
|
||||
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
|
||||
if (mask == NULL) {
|
||||
if (!mask) {
|
||||
retval = -1;
|
||||
} else {
|
||||
SDL_SetSurfaceBlendMode(mask, SDL_BLENDMODE_MOD);
|
||||
@@ -404,7 +404,7 @@ static int SW_RenderCopyEx(SDL_Renderer *renderer, SDL_Surface *surface, SDL_Tex
|
||||
SDL_Rect scale_rect = tmp_rect;
|
||||
src_scaled = SDL_CreateRGBSurface(0, final_rect->w, final_rect->h, 32,
|
||||
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
|
||||
if (src_scaled == NULL) {
|
||||
if (!src_scaled) {
|
||||
retval = -1;
|
||||
} else {
|
||||
SDL_SetSurfaceBlendMode(src_clone, SDL_BLENDMODE_NONE);
|
||||
@@ -427,15 +427,15 @@ static int SW_RenderCopyEx(SDL_Renderer *renderer, SDL_Surface *surface, SDL_Tex
|
||||
src_rotated = SDLgfx_rotateSurface(src_clone, angle,
|
||||
(texture->scaleMode == SDL_ScaleModeNearest) ? 0 : 1, flip & SDL_FLIP_HORIZONTAL, flip & SDL_FLIP_VERTICAL,
|
||||
&rect_dest, cangle, sangle, center);
|
||||
if (src_rotated == NULL) {
|
||||
if (!src_rotated) {
|
||||
retval = -1;
|
||||
}
|
||||
if (!retval && mask != NULL) {
|
||||
if (!retval && mask) {
|
||||
/* The mask needed for the NONE blend mode gets rotated with the same parameters. */
|
||||
mask_rotated = SDLgfx_rotateSurface(mask, angle,
|
||||
SDL_FALSE, 0, 0,
|
||||
&rect_dest, cangle, sangle, center);
|
||||
if (mask_rotated == NULL) {
|
||||
if (!mask_rotated) {
|
||||
retval = -1;
|
||||
}
|
||||
}
|
||||
@@ -487,7 +487,7 @@ static int SW_RenderCopyEx(SDL_Renderer *renderer, SDL_Surface *surface, SDL_Tex
|
||||
src_rotated->format->BitsPerPixel, src_rotated->pitch,
|
||||
src_rotated->format->Rmask, src_rotated->format->Gmask,
|
||||
src_rotated->format->Bmask, 0);
|
||||
if (src_rotated_rgb == NULL) {
|
||||
if (!src_rotated_rgb) {
|
||||
retval = -1;
|
||||
} else {
|
||||
SDL_SetSurfaceBlendMode(src_rotated_rgb, SDL_BLENDMODE_ADD);
|
||||
@@ -499,7 +499,7 @@ static int SW_RenderCopyEx(SDL_Renderer *renderer, SDL_Surface *surface, SDL_Tex
|
||||
}
|
||||
SDL_FreeSurface(mask_rotated);
|
||||
}
|
||||
if (src_rotated != NULL) {
|
||||
if (src_rotated) {
|
||||
SDL_FreeSurface(src_rotated);
|
||||
}
|
||||
}
|
||||
@@ -508,10 +508,10 @@ static int SW_RenderCopyEx(SDL_Renderer *renderer, SDL_Surface *surface, SDL_Tex
|
||||
if (SDL_MUSTLOCK(src)) {
|
||||
SDL_UnlockSurface(src);
|
||||
}
|
||||
if (mask != NULL) {
|
||||
if (mask) {
|
||||
SDL_FreeSurface(mask);
|
||||
}
|
||||
if (src_clone != NULL) {
|
||||
if (src_clone) {
|
||||
SDL_FreeSurface(src_clone);
|
||||
}
|
||||
return retval;
|
||||
@@ -538,10 +538,10 @@ static int SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_
|
||||
int i;
|
||||
int count = indices ? num_indices : num_vertices;
|
||||
void *verts;
|
||||
size_t sz = texture != NULL ? sizeof(GeometryCopyData) : sizeof(GeometryFillData);
|
||||
size_t sz = texture ? sizeof(GeometryCopyData) : sizeof(GeometryFillData);
|
||||
|
||||
verts = SDL_AllocateRenderVertices(renderer, count * sz, 0, &cmd->data.draw.first);
|
||||
if (verts == NULL) {
|
||||
if (!verts) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -641,9 +641,9 @@ static void SetDrawState(SDL_Surface *surface, SW_DrawStateCache *drawstate)
|
||||
if (drawstate->surface_cliprect_dirty) {
|
||||
const SDL_Rect *viewport = drawstate->viewport;
|
||||
const SDL_Rect *cliprect = drawstate->cliprect;
|
||||
SDL_assert_release(viewport != NULL); /* the higher level should have forced a SDL_RENDERCMD_SETVIEWPORT */
|
||||
SDL_assert_release(viewport); /* the higher level should have forced a SDL_RENDERCMD_SETVIEWPORT */
|
||||
|
||||
if (cliprect != NULL) {
|
||||
if (cliprect) {
|
||||
SDL_Rect clip_rect;
|
||||
clip_rect.x = cliprect->x + viewport->x;
|
||||
clip_rect.y = cliprect->y + viewport->y;
|
||||
@@ -663,7 +663,7 @@ static int SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, vo
|
||||
SDL_Surface *surface = SW_ActivateRenderer(renderer);
|
||||
SW_DrawStateCache drawstate;
|
||||
|
||||
if (surface == NULL) {
|
||||
if (!surface) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -712,7 +712,7 @@ static int SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, vo
|
||||
SetDrawState(surface, &drawstate);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport != NULL && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
if (drawstate.viewport && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
int i;
|
||||
for (i = 0; i < count; i++) {
|
||||
verts[i].x += drawstate.viewport->x;
|
||||
@@ -739,7 +739,7 @@ static int SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, vo
|
||||
SetDrawState(surface, &drawstate);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport != NULL && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
if (drawstate.viewport && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
int i;
|
||||
for (i = 0; i < count; i++) {
|
||||
verts[i].x += drawstate.viewport->x;
|
||||
@@ -766,7 +766,7 @@ static int SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, vo
|
||||
SetDrawState(surface, &drawstate);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport != NULL && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
if (drawstate.viewport && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
int i;
|
||||
for (i = 0; i < count; i++) {
|
||||
verts[i].x += drawstate.viewport->x;
|
||||
@@ -794,7 +794,7 @@ static int SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, vo
|
||||
PrepTextureForCopy(cmd);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport != NULL && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
if (drawstate.viewport && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
dstrect->x += drawstate.viewport->x;
|
||||
dstrect->y += drawstate.viewport->y;
|
||||
}
|
||||
@@ -852,7 +852,7 @@ static int SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, vo
|
||||
PrepTextureForCopy(cmd);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport != NULL && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
if (drawstate.viewport && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
copydata->dstrect.x += drawstate.viewport->x;
|
||||
copydata->dstrect.y += drawstate.viewport->y;
|
||||
}
|
||||
@@ -880,7 +880,7 @@ static int SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, vo
|
||||
PrepTextureForCopy(cmd);
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport != NULL && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
if (drawstate.viewport && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
SDL_Point vp;
|
||||
vp.x = drawstate.viewport->x;
|
||||
vp.y = drawstate.viewport->y;
|
||||
@@ -903,7 +903,7 @@ static int SW_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, vo
|
||||
GeometryFillData *ptr = (GeometryFillData *) verts;
|
||||
|
||||
/* Apply viewport */
|
||||
if (drawstate.viewport != NULL && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
if (drawstate.viewport && (drawstate.viewport->x || drawstate.viewport->y)) {
|
||||
SDL_Point vp;
|
||||
vp.x = drawstate.viewport->x;
|
||||
vp.y = drawstate.viewport->y;
|
||||
@@ -938,7 +938,7 @@ static int SW_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect,
|
||||
Uint32 src_format;
|
||||
void *src_pixels;
|
||||
|
||||
if (surface == NULL) {
|
||||
if (!surface) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -965,7 +965,7 @@ static int SW_RenderPresent(SDL_Renderer *renderer)
|
||||
{
|
||||
SDL_Window *window = renderer->window;
|
||||
|
||||
if (window == NULL) {
|
||||
if (!window) {
|
||||
return -1;
|
||||
}
|
||||
return SDL_UpdateWindowSurface(window);
|
||||
@@ -995,19 +995,19 @@ SDL_Renderer *SW_CreateRendererForSurface(SDL_Surface *surface)
|
||||
SDL_Renderer *renderer;
|
||||
SW_RenderData *data;
|
||||
|
||||
if (surface == NULL) {
|
||||
if (!surface) {
|
||||
SDL_InvalidParamError("surface");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
renderer = (SDL_Renderer *)SDL_calloc(1, sizeof(*renderer));
|
||||
if (renderer == NULL) {
|
||||
if (!renderer) {
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data = (SW_RenderData *)SDL_calloc(1, sizeof(*data));
|
||||
if (data == NULL) {
|
||||
if (!data) {
|
||||
SW_DestroyRenderer(renderer);
|
||||
SDL_OutOfMemory();
|
||||
return NULL;
|
||||
@@ -1050,7 +1050,7 @@ static SDL_Renderer *SW_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||
|
||||
/* Set the vsync hint based on our flags, if it's not already set */
|
||||
hint = SDL_GetHint(SDL_HINT_RENDER_VSYNC);
|
||||
if (hint == NULL || !*hint) {
|
||||
if (!hint || !*hint) {
|
||||
no_hint_set = SDL_TRUE;
|
||||
} else {
|
||||
no_hint_set = SDL_FALSE;
|
||||
@@ -1067,7 +1067,7 @@ static SDL_Renderer *SW_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||
SDL_SetHint(SDL_HINT_RENDER_VSYNC, "");
|
||||
}
|
||||
|
||||
if (surface == NULL) {
|
||||
if (!surface) {
|
||||
return NULL;
|
||||
}
|
||||
return SW_CreateRendererForSurface(surface);
|
||||
|
||||
@@ -500,7 +500,7 @@ SDL_Surface *SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, in
|
||||
double sangleinv, cangleinv;
|
||||
|
||||
/* Sanity check */
|
||||
if (src == NULL) {
|
||||
if (!src) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -524,7 +524,7 @@ SDL_Surface *SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, in
|
||||
if (is8bit) {
|
||||
/* Target surface is 8 bit */
|
||||
rz_dst = SDL_CreateRGBSurfaceWithFormat(0, rect_dest->w, rect_dest->h + GUARD_ROWS, 8, src->format->format);
|
||||
if (rz_dst != NULL) {
|
||||
if (rz_dst) {
|
||||
if (src->format->palette) {
|
||||
for (i = 0; i < src->format->palette->ncolors; i++) {
|
||||
rz_dst->format->palette->colors[i] = src->format->palette->colors[i];
|
||||
@@ -540,7 +540,7 @@ SDL_Surface *SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, in
|
||||
}
|
||||
|
||||
/* Check target */
|
||||
if (rz_dst == NULL) {
|
||||
if (!rz_dst) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poin
|
||||
|
||||
SDL_Surface *tmp = NULL;
|
||||
|
||||
if (dst == NULL) {
|
||||
if (!dst) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poin
|
||||
|
||||
/* Use an intermediate surface */
|
||||
tmp = SDL_CreateRGBSurfaceWithFormat(0, dstrect.w, dstrect.h, 0, format);
|
||||
if (tmp == NULL) {
|
||||
if (!tmp) {
|
||||
ret = -1;
|
||||
goto end;
|
||||
}
|
||||
@@ -460,7 +460,7 @@ int SDL_SW_BlitTriangle(
|
||||
|
||||
int has_modulation;
|
||||
|
||||
if (src == NULL || dst == NULL) {
|
||||
if (!src || !dst) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user