Skip to content

Commit 5ddbc42

Browse files
committed
call TTF_CloseFont before TTF_Quit
1 parent 3bc340a commit 5ddbc42

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/backends/SDLBackend.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,12 @@ int SDLBackend::networkInit() {
101101
}
102102

103103
void SDLBackend::shutdown() {
104-
if (TTF_WasInit())
104+
if (TTF_WasInit()) {
105+
if (basicfont) {
106+
TTF_CloseFont(basicfont);
107+
}
105108
TTF_Quit();
109+
}
106110
if (networkingup && listensocket)
107111
SDLNet_TCP_Close(listensocket);
108112
SDLNet_Quit();

0 commit comments

Comments
 (0)