Skip to content

Commit f97d3c0

Browse files
committed
Removed video init check, moved surf check higher
1 parent 725074c commit f97d3c0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src_c/window.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,16 @@ window_flip(pgWindowObject *self)
183183
{
184184
int result;
185185

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

188192
Py_BEGIN_ALLOW_THREADS;
189193
result = SDL_UpdateWindowSurface(self->_win);
190194
Py_END_ALLOW_THREADS;
191195
if (result) {
192-
if (!self->surf) {
193-
return RAISE(pgExc_SDLError,
194-
"the Window has no surface associated with it, did "
195-
"you forget to call Window.get_surface()");
196-
}
197196
return RAISE(pgExc_SDLError, SDL_GetError());
198197
}
199198
Py_RETURN_NONE;

0 commit comments

Comments
 (0)