[Xfce4-commits] [apps/xfdashboard] 01/01: Get rid of warning messages in XfdashboardApplicationTracker when active windows changes but a NULL pointer was sent (why ever?)

noreply at xfce.org noreply at xfce.org
Fri Nov 6 11:42:00 CET 2015


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit 3daf3160f1c8728145166ab74885a65e023b8f8d
Author: Stephan Haller <nomad at froevel.de>
Date:   Fri Nov 6 11:40:32 2015 +0100

    Get rid of warning messages in XfdashboardApplicationTracker when active windows changes but a NULL pointer was sent (why ever?)
---
 xfdashboard/application-tracker.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/xfdashboard/application-tracker.c b/xfdashboard/application-tracker.c
index 904d4a0..1e33df5 100644
--- a/xfdashboard/application-tracker.c
+++ b/xfdashboard/application-tracker.c
@@ -757,12 +757,21 @@ static void _xfdashboard_application_tracker_on_active_window_changed(Xfdashboar
 	XfdashboardApplicationTrackerItem		*item;
 
 	g_return_if_fail(XFDASHBOARD_IS_APPLICATION_TRACKER(self));
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inNewActiveWindow));
+	g_return_if_fail(!inNewActiveWindow || XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inNewActiveWindow));
+
+	/* New active window might be NULL (why ever?) so return immediately
+	 * in this case.
+	 */
+	if(!inNewActiveWindow)
+	{
+		g_debug("No new active window to check for running application.");
+		return;
+	}
 
 	/* Find application tracker item in list of known running applications
 	 * matching the new active window.
 	 */
-	item= _xfdashboard_application_tracker_find_item_by_window(self, inNewActiveWindow);
+	item=_xfdashboard_application_tracker_find_item_by_window(self, inNewActiveWindow);
 	if(!item)
 	{
 		g_debug("Could not find running application for new active window '%s'",

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list