From 0eaf1d0019b1cb4da4b87f6e2e034ec7e9979736 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Fri, 20 Nov 2015 15:11:47 +0000 Subject: Fixed caja flooding .xsession-errors with "caja_menu_provider_get_background_items: assertion 'CAJA_IS_MENU_PROVIDER (provider)' failed" --- libcaja-extension/caja-menu-provider.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcaja-extension/caja-menu-provider.c b/libcaja-extension/caja-menu-provider.c index 0c47dd13..7198b8c3 100644 --- a/libcaja-extension/caja-menu-provider.c +++ b/libcaja-extension/caja-menu-provider.c @@ -115,7 +115,10 @@ caja_menu_provider_get_background_items (CajaMenuProvider *provider, GtkWidget *window, CajaFileInfo *current_folder) { - g_return_val_if_fail (CAJA_IS_MENU_PROVIDER (provider), NULL); + if (!CAJA_IS_MENU_PROVIDER (provider)) { + return NULL; + } + g_return_val_if_fail (CAJA_IS_FILE_INFO (current_folder), NULL); if (CAJA_MENU_PROVIDER_GET_IFACE (provider)->get_background_items) -- cgit v1.2.1