Skip to content

Commit

Permalink
bugfix: ShowMessage dialog could crash if custom font was used (fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Jan 12, 2025
1 parent 6494832 commit 69c11f9
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/osdep/gui/ShowMessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,8 @@ static void InitShowMessage(const std::string& message)
{
TTF_Init();

try
{
gui_font = new gcn::SDLTrueTypeFont(prefix_with_data_path(gui_theme.font_name), gui_theme.font_size);
gui_font->setAntiAlias(false);
gui_font->setColor(gui_font_color);
}
catch (exception& ex)
{
cout << ex.what() << '\n';
write_log("An error occurred while trying to open the GUI font! Exception: %s\n", ex.what());
abort();
}

gcn::Widget::setGlobalFont(gui_font);
load_theme(amiberry_options.gui_theme);
apply_theme();
}

wndShowMessage = new gcn::Window("Message");
Expand Down

0 comments on commit 69c11f9

Please sign in to comment.