Skip to content

Commit 0610ff2

Browse files
committed
maybe fixed uninitialized variable error
1 parent d1a982c commit 0610ff2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src_c/surface.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,6 +1655,8 @@ surf_convert_alpha(pgSurfaceObject *self, PyObject *args)
16551655
pgSurfaceObject *srcsurf = NULL;
16561656
SDL_Surface *newsurf;
16571657

1658+
SURF_INIT_CHECK(surf)
1659+
16581660
if (!SDL_WasInit(SDL_INIT_VIDEO))
16591661
return RAISE(pgExc_SDLError,
16601662
"cannot convert without pygame.display initialized");
@@ -1821,7 +1823,6 @@ static PyObject *
18211823
surf_blit(pgSurfaceObject *self, PyObject *args, PyObject *keywds)
18221824
{
18231825
SDL_Surface *src, *dest = pgSurface_AsSurface(self);
1824-
SURF_INIT_CHECK(src)
18251826
SDL_Rect *src_rect, temp;
18261827
PyObject *argpos, *argrect = NULL;
18271828
pgSurfaceObject *srcobject;
@@ -1913,7 +1914,7 @@ surf_blits(pgSurfaceObject *self, PyObject *args, PyObject *keywds)
19131914

19141915
static char *kwids[] = {"blit_sequence", "doreturn", NULL};
19151916

1916-
SURF_INIT_CHECK(src)
1917+
SURF_INIT_CHECK(dest)
19171918
if (!PyArg_ParseTupleAndKeywords(args, keywds, "O|i", kwids, &blitsequence,
19181919
&doreturn))
19191920
return NULL;

0 commit comments

Comments
 (0)