this is why operator new is better than malloc
(we can't use new here; we're passing this structure to SDL)
This commit is contained in:
@@ -104,7 +104,7 @@ void ApplyGraphicOptions()
|
||||
void ExitGame()
|
||||
{
|
||||
SDL_Event *event;
|
||||
event = (SDL_Event *) malloc(sizeof(event));
|
||||
event = (SDL_Event *) malloc(sizeof(SDL_Event));
|
||||
event->type = SDL_QUIT;
|
||||
SDL_PushEvent(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user