Alex Holkner wrote:
Having just looked at the pygame.event.post() code: it is possible to crash pygame (or at the very least, get garbage values) by posting a user event with a dictionary, then peeking that event more than once (or peeking it and then getting it).An additional undocumented signature is available: pygame.event.peek(): return Event
The function returns the next event instead of a bool if no arguments are given.
The returned event is filled with nonsense (uninitialized) values if no event is in the queue. Suggest it return None in this case instead, or that the undocumented functionality be removed entirely.
Alex.
Alex.