[gnome-flashback] input-sources: don't create status icon with invalid size



commit c5f20f2cdf509a80a7eef6f9486eec41b1cca7db
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Dec 7 00:27:42 2015 +0200

    input-sources: don't create status icon with invalid size

 .../libinput-sources/gf-input-sources.c            |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-input-sources.c 
b/gnome-flashback/libinput-sources/gf-input-sources.c
index f40b13e..95765eb 100644
--- a/gnome-flashback/libinput-sources/gf-input-sources.c
+++ b/gnome-flashback/libinput-sources/gf-input-sources.c
@@ -164,6 +164,9 @@ update_status_icon_pixbuf (GfInputSources *sources)
   size = gtk_status_icon_get_size (sources->status_icon);
   G_GNUC_END_IGNORE_DEPRECATIONS
 
+  if (size <= 0)
+    return;
+
   surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, size, size);
   cr = cairo_create (surface);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]