Allow not setting a changed callback on GtkBookmarksManager

This commit is contained in:
Federico Mena Quintero 2012-12-05 18:03:54 -06:00
parent 489000ba9a
commit eecda25d64

View File

@ -152,7 +152,8 @@ save_bookmarks (GFile *bookmarks_file,
static void
notify_changed (GtkBookmarksManager *manager)
{
manager->changed_func (manager->changed_func_data);
if (manager->changed_func)
manager->changed_func (manager->changed_func_data);
}
static void
@ -193,8 +194,6 @@ _gtk_bookmarks_manager_new (GtkBookmarksChangedFunc changed_func, gpointer chang
GFile *bookmarks_file;
GError *error;
g_return_val_if_fail (changed_func != NULL, NULL);
manager = g_new0 (GtkBookmarksManager, 1);
manager->changed_func = changed_func;