[Xfce4-commits] [apps/xfce4-screensaver] 01/01: Handle no-window state gracefully
noreply at xfce.org
noreply at xfce.org
Fri Mar 15 01:50:45 CET 2019
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-screensaver.
commit 0357a6662e3976a7e186c3d04316c9a5649872e7
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Mar 14 20:50:36 2019 -0400
Handle no-window state gracefully
---
src/gs-manager.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/gs-manager.c b/src/gs-manager.c
index a3164e5..d978259 100644
--- a/src/gs-manager.c
+++ b/src/gs-manager.c
@@ -1097,6 +1097,10 @@ find_window_at_pointer (GSManager *manager) {
if (window == NULL) {
gs_debug ("WARNING: Could not find the GSWindow for display %s",
gdk_display_get_name (display));
+ /* bail if there are no windows available */
+ if (manager->priv->windows == NULL)
+ return NULL;
+
/* take the first one */
window = manager->priv->windows->data;
} else {
@@ -1118,6 +1122,9 @@ gs_manager_show_message (GSManager *manager,
/* Find the GSWindow that contains the pointer */
window = find_window_at_pointer (manager);
+ if (window == NULL)
+ return;
+
gs_window_show_message (window, summary, body, icon);
gs_manager_request_unlock (manager);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list