mirror of
https://github.com/LIV2/amiberry.git
synced 2025-12-05 22:22:44 +00:00
bugfix: ShowMessage dialog could crash if custom font was used (fixes #1591)
This commit is contained in:
parent
6494832ff1
commit
69c11f909d
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user