Skip to content

Commit 29644a2

Browse files
committed
fix
1 parent f500088 commit 29644a2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/emitter.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ emitter_init(EmitterObject *self, PyObject *args, PyObject *kwds)
182182
}
183183

184184
pgSurfaceObject *surf_obj = (pgSurfaceObject *)img;
185-
SURF_INIT_CHECK(surf_obj->surf);
185+
if (!surf_obj->surf) {
186+
PyErr_SetString(PyExc_RuntimeError, "Surface is not initialized");
187+
return -1;
188+
}
186189

187190
SDL_Surface *surf = surf_obj->surf;
188191
Uint8 alpha;

0 commit comments

Comments
 (0)