Don't leak a ref to the settings
https://bugzilla.gnome.org/show_bug.cgi?id=683896
This commit is contained in:
		 William Jon McCann
					William Jon McCann
				
			
				
					committed by
					
						 Matthias Clasen
						Matthias Clasen
					
				
			
			
				
	
			
			
			 Matthias Clasen
						Matthias Clasen
					
				
			
						parent
						
							1f5dea9eba
						
					
				
				
					commit
					8a9a3949dd
				
			| @ -2091,7 +2091,7 @@ gtk_toolbar_screen_changed (GtkWidget *widget, | ||||
|   if (old_settings) | ||||
|     { | ||||
|       g_signal_handler_disconnect (old_settings, priv->settings_connection); | ||||
|  | ||||
|       priv->settings_connection = 0; | ||||
|       g_object_unref (old_settings); | ||||
|     } | ||||
|  | ||||
| @ -3122,6 +3122,14 @@ gtk_toolbar_dispose (GObject *object) | ||||
|       priv->menu = NULL; | ||||
|     } | ||||
|  | ||||
|   if (priv->settings_connection > 0) | ||||
|     { | ||||
|       g_signal_handler_disconnect (priv->settings, priv->settings_connection); | ||||
|       priv->settings_connection = 0; | ||||
|     } | ||||
|  | ||||
|   g_clear_object (&priv->settings); | ||||
|  | ||||
|  G_OBJECT_CLASS (gtk_toolbar_parent_class)->dispose (object); | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user