fix some reaction stuff

This commit is contained in:
ouwou
2020-12-15 02:45:37 -05:00
parent 2667a4b30d
commit 315a4a8df8
4 changed files with 38 additions and 12 deletions

View File

@@ -465,7 +465,11 @@ Gtk::Widget *ChatMessageItemContainer::CreateReactionsComponent(const Message *d
// image
if (is_stock) { // unicode/stock
const auto &pb = emojis.GetPixBuf(reaction.Emoji.Name);
auto *img = Gtk::manage(new Gtk::Image(pb->scale_simple(16, 16, Gdk::INTERP_BILINEAR)));
Gtk::Image *img;
if (pb)
img = Gtk::manage(new Gtk::Image(pb->scale_simple(16, 16, Gdk::INTERP_BILINEAR)));
else
img = Gtk::manage(new Gtk::Image(placeholder));
img->set_can_focus(false);
box->add(*img);
} else { // custom