summaryrefslogtreecommitdiff
path: root/src/destructor.cpp
blob: 7f1c906747ae9ea03bf21f68b4d5e3259b5ff5a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "FLD.hpp"
#include <SDL2/SDL.h>

FLD::~FLD()
{
	if (_target != nullptr) {
		SDL_DestroyTexture(_target);
		_target = nullptr;
	}
	if (_renderer != nullptr) {
		SDL_DestroyRenderer(_renderer);
		_renderer = nullptr;
	}
	if (_window != nullptr) {
		SDL_DestroyWindow(_window);
		_window = nullptr;
	}
	SDL_Quit();
}