[gnome-software] shell-extensions: Fix a warning on a NULL UUID
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] shell-extensions: Fix a warning on a NULL UUID
- Date: Tue, 30 Jul 2019 14:41:19 +0000 (UTC)
commit 0faa8871ba4506b0d7ac148127d73909645f07eb
Author: Philip Withnall <withnall endlessm com>
Date: Mon Jul 29 17:59:50 2019 +0100
shell-extensions: Fix a warning on a NULL UUID
This fixes the warning:
```
failed to process
components/component/custom/value[@key='shell-extensions::uuid'][text()='(null)']/../..: failed to parse
part: cannot parse text or number `null`
```
Signed-off-by: Philip Withnall <withnall endlessm com>
plugins/shell-extensions/gs-plugin-shell-extensions.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/plugins/shell-extensions/gs-plugin-shell-extensions.c
b/plugins/shell-extensions/gs-plugin-shell-extensions.c
index 77dcb0c8..2873ec8a 100644
--- a/plugins/shell-extensions/gs-plugin-shell-extensions.c
+++ b/plugins/shell-extensions/gs-plugin-shell-extensions.c
@@ -460,6 +460,9 @@ gs_plugin_refine_app (GsPlugin *plugin,
locker = g_rw_lock_reader_locker_new (&priv->silo_lock);
/* find the component using the UUID */
+ if (uuid == NULL)
+ return TRUE;
+
xpath = g_strdup_printf ("components/component/custom/"
"value[@key='shell-extensions::uuid'][text()='%s']/../..",
uuid);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]