Allow not setting a changed callback on GtkBookmarksManager

parent 489000ba
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment