After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701365 - Do not assert sm_proxy != NULL in GtkApplication inhibit functions
Do not assert sm_proxy != NULL in GtkApplication inhibit functions
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkApplication
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-05-31 14:24 UTC by Matthew Barnes
Modified: 2013-07-28 20:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.51 KB, patch)
2013-05-31 14:24 UTC, Matthew Barnes
accepted-commit_now Details | Review

Description Matthew Barnes 2013-05-31 14:24:26 UTC
Created attachment 245743 [details] [review]
Proposed patch

Applications have no way of finding out if a session manager proxy was successfully created in gtk_application_startup_session_dbus(), so it's not appropriate for certain public GtkApplication functions to be asserting the presence of a session manager proxy as if it were a programmer error.

This affects:

   gtk_application_inhibit()
   gtk_application_is_inhibited()

If sm_proxy is NULL, the function should just return silently.

In the case of gtk_application_uninhibit(), the application should only be calling this if it obtained a valid cookie, which implies the presence of a session manager proxy.  I noted that with a comment.
Comment 1 Matthias Clasen 2013-07-28 03:48:19 UTC
Review of attachment 245743 [details] [review]:

sure