~larsu/appmenu-gtk/lp1026160

« back to all changes in this revision

Viewing changes to src/bridge.c

  • Committer: Lars Uebernickel
  • Date: 2012-07-18 16:27:28 UTC
  • Revision ID: lars.uebernickel@canonical.com-20120718162728-gylfc6o0ftahq6wn
Check for NULL before using GtkMenu.attach-widget

This wasn't a problem before, because GtkMenu didn't notify when it was
detached from its parent widget. This was fixed in gtk with f81bd6c.

Show diffs side-by-side

added added

removed removed

Lines of Context:
822
822
 
823
823
      g_object_get (widget, "attach-widget", &attach, NULL);
824
824
 
825
 
      rebuild (bridge, attach);
826
 
 
827
 
      g_clear_object (&attach);
 
825
      if (attach != NULL)
 
826
        {
 
827
          rebuild (bridge, attach);
 
828
          g_object_unref (attach);
 
829
        }
828
830
    }
829
831
}
830
832