Skip to content

Commit 9618d03

Browse files
committed
events: Drop mouse motion if screen surface isn't available yet.
Reference Issue #215.
1 parent 3fac63a commit 9618d03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/SDL12_compat.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4533,6 +4533,10 @@ EventFilter20to12(void *data, SDL_Event *event20)
45334533
}
45344534

45354535
case SDL_MOUSEMOTION:
4536+
if (!VideoSurface12) {
4537+
return 1; /* we don't have a screen surface yet? Don't send this on to the app. */
4538+
}
4539+
45364540
event12.type = SDL12_MOUSEMOTION;
45374541
event12.motion.which = (Uint8) event20->motion.which;
45384542
event12.motion.state = event20->motion.state;

0 commit comments

Comments
 (0)