Skip to content

Commit ff7c45c

Browse files
author
in1tiate
committed
add workaround for emotes crash
1 parent e6ced65 commit ff7c45c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/emotes.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ void Courtroom::refresh_emotes()
3939
QPoint p_point =
4040
ao_app->get_button_spacing("emote_button_size", "courtroom_design.ini");
4141

42+
if (ui_emotes->width() == 0 || ui_emotes->height() == 0) { // Workaround for a nasty crash
43+
ui_emotes->hide();
44+
return;
45+
}
46+
4247
const int button_width = p_point.x();
4348
int x_spacing = f_spacing.x();
4449
int x_mod_count = 0;

0 commit comments

Comments
 (0)