summaryrefslogtreecommitdiffstats
path: root/meta-xfce/recipes-xfce/tumbler/files/0001-Handle-cases-where-there-are-no-plugins-gracefully.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xfce/recipes-xfce/tumbler/files/0001-Handle-cases-where-there-are-no-plugins-gracefully.patch')
-rw-r--r--meta-xfce/recipes-xfce/tumbler/files/0001-Handle-cases-where-there-are-no-plugins-gracefully.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-xfce/recipes-xfce/tumbler/files/0001-Handle-cases-where-there-are-no-plugins-gracefully.patch b/meta-xfce/recipes-xfce/tumbler/files/0001-Handle-cases-where-there-are-no-plugins-gracefully.patch
new file mode 100644
index 0000000000..3a3eb2fd64
--- /dev/null
+++ b/meta-xfce/recipes-xfce/tumbler/files/0001-Handle-cases-where-there-are-no-plugins-gracefully.patch
@@ -0,0 +1,57 @@
1From 95244ee0d1f3184e2c2cae9d33095dc03829b10e Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Ga=C3=ABl=20Bonithon?= <gael@xfce.org>
3Date: Fri, 20 Feb 2026 17:07:56 +0100
4Subject: [PATCH] Handle cases where there are no plugins gracefully
5
6Not sure it makes much sense to allow the cache plugin not to be built,
7but then again, why not? It could be replaced by a customized
8implementation, and it has always been possible not to build it, so we
9might as well leave it as it is.
10
11Fixes: #109
12(cherry picked from commit b4f4db4bfc1a45f0a405c4516e38394a44c90fcf)
13
14Upstream-Status: Backport [https://gitlab.xfce.org/xfce/tumbler/-/commit/95244ee0d1f3184e2c2cae9d33095dc03829b10e]
15
16Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
17---
18 tumbler/tumbler-cache-plugin.c | 5 ++++-
19 tumblerd/tumbler-registry.c | 7 ++++++-
20 2 files changed, 10 insertions(+), 2 deletions(-)
21
22diff --git a/tumbler/tumbler-cache-plugin.c b/tumbler/tumbler-cache-plugin.c
23index 50700a3..e308638 100644
24--- a/tumbler/tumbler-cache-plugin.c
25+++ b/tumbler/tumbler-cache-plugin.c
26@@ -188,7 +188,10 @@ tumbler_cache_plugin_get_default (void)
27 g_object_add_weak_pointer (G_OBJECT (plugin), (gpointer) &plugin);
28
29 if (!g_type_module_use (G_TYPE_MODULE (plugin)))
30- return NULL;
31+ {
32+ g_object_unref (plugin);
33+ return NULL;
34+ }
35 }
36
37 return G_TYPE_MODULE (plugin);
38diff --git a/tumblerd/tumbler-registry.c b/tumblerd/tumbler-registry.c
39index 705dbc9..b58e831 100644
40--- a/tumblerd/tumbler-registry.c
41+++ b/tumblerd/tumbler-registry.c
42@@ -534,7 +534,12 @@ tumbler_registry_update_supported (TumblerRegistry *registry)
43
44 /* abort if there are no thumbnailers */
45 if (thumbnailers == NULL)
46- return;
47+ {
48+ /* we need NULL-terminated arrays for the _get_supported() dbus call anyway */
49+ registry->uri_schemes = g_new0 (gchar *, 1);
50+ registry->mime_types = g_new0 (gchar *, 1);
51+ return;
52+ }
53
54 /* clear visited flag of all thumbnailers */
55 for (lp = thumbnailers; lp != NULL; lp = lp->next)
56--
572.50.0