[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/02: Fix crash when reload is required with garcon 0.6.2.

noreply at xfce.org noreply at xfce.org
Sat Jan 12 17:10:02 CET 2019


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

g   o   t   t   c   o   d   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 panel-plugins/xfce4-whiskermenu-plugin.

commit 2fb2ec5a0fd031ad7ff377a86e8fd0e06c83ab94
Author: Graeme Gott <graeme at gottcode.org>
Date:   Sat Jan 12 08:31:50 2019 -0500

    Fix crash when reload is required with garcon 0.6.2.
---
 panel-plugin/applications-page.cpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/applications-page.cpp b/panel-plugin/applications-page.cpp
index 4d6dc4b..c58a7a0 100644
--- a/panel-plugin/applications-page.cpp
+++ b/panel-plugin/applications-page.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2015, 2016, 2017, 2018 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2015, 2016, 2017, 2018, 2019 Graeme Gott <graeme at gottcode.org>
  *
  * This library is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -160,6 +160,7 @@ void ApplicationsPage::invalidate_applications()
 	if (m_load_status == STATUS_LOADED)
 	{
 		m_load_status = STATUS_INVALID;
+		clear_applications();
 	}
 	else if (m_load_status == STATUS_LOADING)
 	{
@@ -339,7 +340,15 @@ void ApplicationsPage::load_contents()
 	get_window()->set_items();
 	get_window()->set_loaded();
 
-	m_load_status = (m_load_status == STATUS_LOADING) ? STATUS_LOADED : STATUS_INVALID;
+	if (m_load_status == STATUS_LOADING)
+	{
+		m_load_status = STATUS_LOADED;
+	}
+	else
+	{
+		m_load_status = STATUS_INVALID;
+		clear_applications();
+	}
 }
 
 //-----------------------------------------------------------------------------

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


More information about the Xfce4-commits mailing list