[Xfce4-commits] <postler:master> Test whether CellRendererToggle.get_size has cell_area

Christian Dywan noreply at xfce.org
Tue Nov 9 03:54:01 CET 2010


Updating branch refs/heads/master
         to e90094eb77ff2f730d0446b01e9f582b5bb46f09 (commit)
       from 7ea3acfa2351b206a66aa5d4825f96e192c68ff3 (commit)

commit e90094eb77ff2f730d0446b01e9f582b5bb46f09
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Nov 9 03:53:21 2010 +0100

    Test whether CellRendererToggle.get_size has cell_area

 postler/postler-cellrenderertoggle.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/postler/postler-cellrenderertoggle.vala b/postler/postler-cellrenderertoggle.vala
index 597b3d5..afaaf2c 100644
--- a/postler/postler-cellrenderertoggle.vala
+++ b/postler/postler-cellrenderertoggle.vala
@@ -18,7 +18,8 @@ public class Postler.CellRendererToggle : Gtk.CellRendererToggle {
     public override void get_size (Gtk.Widget widget, Gdk.Rectangle? cell_area,
         out int x_offset, out int y_offset, out int width, out int height) {
         if (&x_offset != null) x_offset = 0;
-        if (&y_offset != null) y_offset = cell_area.height / 3;
+        if (&y_offset != null)
+            y_offset = &cell_area != null ? cell_area.height / 3 : 0;
         if (&width != null && &height != null)
             Gtk.icon_size_lookup_for_settings (widget.get_settings (),
                 Gtk.IconSize.MENU, out width, out height);



More information about the Xfce4-commits mailing list