Skip to content

Commit

Permalink
Removed video init check, moved surf check higher
Browse files Browse the repository at this point in the history
  • Loading branch information
Matiiss committed Jan 6, 2024
1 parent 725074c commit f97d3c0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src_c/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,16 @@ window_flip(pgWindowObject *self)
{
int result;

VIDEO_INIT_CHECK();
if (!self->surf) {
return RAISE(pgExc_SDLError,
"the Window has no surface associated with it, did "
"you forget to call Window.get_surface()");
}

Py_BEGIN_ALLOW_THREADS;
result = SDL_UpdateWindowSurface(self->_win);
Py_END_ALLOW_THREADS;
if (result) {
if (!self->surf) {
return RAISE(pgExc_SDLError,
"the Window has no surface associated with it, did "
"you forget to call Window.get_surface()");
}
return RAISE(pgExc_SDLError, SDL_GetError());
}
Py_RETURN_NONE;
Expand Down

0 comments on commit f97d3c0

Please sign in to comment.