Skip to content

Commit e3453ef

Browse files
fix: Free SDL surface after setting window icon
1 parent 29fcdc6 commit e3453ef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Core/Context.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,6 @@ std::shared_ptr<Context> Context::GetInstance() {
164164
void Context::SetWindowIcon(const std::string &path) {
165165
SDL_Surface *image = IMG_Load(path.c_str());
166166
SDL_SetWindowIcon(m_Window, image);
167+
SDL_FreeSurface(image);
167168
}
168169
} // namespace Core

0 commit comments

Comments
 (0)