aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index e7cbadc23..363d29441 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -887,8 +887,18 @@ static void
contact_avatar_changed_cb (EmpathyContact *contact,
GParamSpec *pspec, GtkWidget *avatar_widget)
{
- init_contact_avatar_with_size (contact, avatar_widget,
- avatar_widget->allocation.height);
+ int size;
+
+ size = avatar_widget->allocation.height;
+
+ if (size == 0)
+ {
+ /* the widget is not allocated yet, set a default size */
+ size = MIN (REMOTE_CONTACT_AVATAR_DEFAULT_HEIGHT,
+ REMOTE_CONTACT_AVATAR_DEFAULT_WIDTH);
+ }
+
+ init_contact_avatar_with_size (contact, avatar_widget, size);
}
static void