[Xfce4-commits] [apps/xfdashboard] 01/01: Search provider may return NULL pointers instead of empty result sets. Fix accessing NULL pointers when accessing result sets.

noreply at xfce.org noreply at xfce.org
Tue Jan 5 15:42:36 CET 2016


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

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

commit a47f30432eb196abc3dc643790724d69219a31ad
Author: Stephan Haller <nomad at froevel.de>
Date:   Tue Jan 5 15:41:52 2016 +0100

    Search provider may return NULL pointers instead of empty result sets. Fix accessing NULL pointers when accessing result sets.
---
 xfdashboard/search-view.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xfdashboard/search-view.c b/xfdashboard/search-view.c
index 0b35b55..e56eeaf 100644
--- a/xfdashboard/search-view.c
+++ b/xfdashboard/search-view.c
@@ -1002,7 +1002,7 @@ static guint _xfdashboard_search_view_perform_search(XfdashboardSearchView *self
 			_xfdashboard_search_view_can_do_incremental_search(providerData->lastTerms, inSearchTerms))
 		{
 			canDoIncrementalSearch=TRUE;
-			providerLastResultSet=g_object_ref(providerData->lastResultSet);
+			if(providerData->lastResultSet) providerLastResultSet=g_object_ref(providerData->lastResultSet);
 		}
 
 		/* Perform search */
@@ -1012,10 +1012,10 @@ static guint _xfdashboard_search_view_perform_search(XfdashboardSearchView *self
 		g_debug("Performed %s search at search provider %s and got %u result items",
 					canDoIncrementalSearch==TRUE ? "incremental" : "full",
 					G_OBJECT_TYPE_NAME(providerData->provider),
-					xfdashboard_search_result_set_get_size(providerNewResultSet));
+					providerNewResultSet ? xfdashboard_search_result_set_get_size(providerNewResultSet) : 0);
 
 		/* Count number of results */
-		numberResults+=xfdashboard_search_result_set_get_size(providerNewResultSet);
+		if(providerNewResultSet) numberResults+=xfdashboard_search_result_set_get_size(providerNewResultSet);
 
 		/* Update view of search provider for new result set */
 		_xfdashboard_search_view_update_provider_container(self, providerData, providerNewResultSet);

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


More information about the Xfce4-commits mailing list