Gtk: Fix crash when no icon is found.

This commit is contained in:
BearOso 2020-08-23 17:17:55 -05:00
parent 95c7fdad1f
commit 1fc5a2d4d6
1 changed files with 2 additions and 3 deletions

View File

@ -86,9 +86,8 @@ Snes9xWindow::Snes9xWindow(Snes9xConfig *config)
}
else
{
auto loader = Gdk::PixbufLoader::create();
loader->write((const guint8 *)app_icon, sizeof(app_icon));
window->set_default_icon(loader->get_pixbuf());
auto pixbuf = Gdk::Pixbuf::create_from_inline(sizeof(app_icon), app_icon, false);
window->set_default_icon(pixbuf);
}
drawing_area = get_object<Gtk::DrawingArea>("drawingarea").get();