video: Streamline a little deinit code.

Fixes #8290.
main
Ryan C. Gordon 2023-09-25 16:26:14 -04:00
parent 2a1058713c
commit e1789b320e
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 5 additions and 6 deletions

View File

@ -3747,12 +3747,11 @@ void SDL_VideoQuit(void)
SDL_VideoDisplay *display = _this->displays[i]; SDL_VideoDisplay *display = _this->displays[i];
SDL_DelVideoDisplay(display->id, SDL_FALSE); SDL_DelVideoDisplay(display->id, SDL_FALSE);
} }
if (_this->displays) {
SDL_assert(_this->num_displays == 0); SDL_assert(_this->num_displays == 0);
SDL_free(_this->displays); SDL_free(_this->displays);
_this->displays = NULL; _this->displays = NULL;
_this->num_displays = 0;
}
if (_this->primary_selection_text) { if (_this->primary_selection_text) {
SDL_free(_this->primary_selection_text); SDL_free(_this->primary_selection_text);
_this->primary_selection_text = NULL; _this->primary_selection_text = NULL;