From 79f792e090330a05753f9edb27332a946eb0840d Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 2 Nov 2024 22:24:59 +0100 Subject: Fix and improve stateless file-sharing --- main/src/ui/widgets/avatar_picture.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/src/ui/widgets') diff --git a/main/src/ui/widgets/avatar_picture.vala b/main/src/ui/widgets/avatar_picture.vala index fb254915..ef1462ae 100644 --- a/main/src/ui/widgets/avatar_picture.vala +++ b/main/src/ui/widgets/avatar_picture.vala @@ -285,7 +285,7 @@ public class Dino.Ui.CompatAvatarDrawer { private Cairo.Surface sub_surface_idx(Cairo.Context ctx, int idx, int width, int height, int font_factor = 1) { ViewModel.AvatarPictureTileModel tile = (ViewModel.AvatarPictureTileModel) this.model.tiles.get_item(idx); - Gdk.Pixbuf? avatar = new Gdk.Pixbuf.from_file(tile.image_file.get_path()); + Gdk.Pixbuf? avatar = tile.image_file != null ? new Gdk.Pixbuf.from_file(tile.image_file.get_path()) : null; string? name = idx >= 0 ? tile.display_text : ""; Gdk.RGBA hex_color = tile.background_color; return sub_surface(ctx, font_family, avatar, name, hex_color, width, height, font_factor); -- cgit v1.2.3-70-g09d2