Fix crash when triggering actions via dunstctl
g_list_nth_data was used to query the notification list, but in the code it was erroneously assumed that a GList object was returned rather than a notification. One of the many pitfalls of generic pointers... Fixes #727
This commit is contained in:
		
							parent
							
								
									8afb7fcd1a
								
							
						
					
					
						commit
						0de8610b67
					
				| @ -224,10 +224,9 @@ static void dbus_cb_dunst_NotificationAction(GDBusConnection *connection, | ||||
|                 return; | ||||
|         } | ||||
| 
 | ||||
|         const GList *list = g_list_nth_data(queues_get_displayed(), notification_nr); | ||||
|         struct notification *n = g_list_nth_data(queues_get_displayed(), notification_nr); | ||||
| 
 | ||||
|         if (list && list->data) { | ||||
|                 struct notification *n = list->data; | ||||
|         if (n) { | ||||
|                 LOG_D("CMD: Calling action for notification %s", n->summary); | ||||
|                 notification_do_action(n); | ||||
|         } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nikos Tsipinakis
						Nikos Tsipinakis