[gnome-software] trivial: Do not emit a critical warning when moderating unknown apps
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Do not emit a critical warning when moderating unknown apps
- Date: Tue, 23 Feb 2016 20:46:19 +0000 (UTC)
commit a879faf93f2b0cfd34f9f0c646f3e4a8446a12f0
Author: Richard Hughes <richard hughsie com>
Date: Tue Feb 23 20:44:57 2016 +0000
trivial: Do not emit a critical warning when moderating unknown apps
src/gs-app-row.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index c956642..749ccf2 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -111,6 +111,8 @@ gs_app_row_get_description (GsAppRow *app_row)
tmp = gs_app_get_summary (priv->app);
if (tmp == NULL || (tmp != NULL && tmp[0] == '\0'))
tmp = gs_app_get_name (priv->app);
+ if (tmp == NULL)
+ return NULL;
escaped = g_markup_escape_text (tmp, -1);
return g_string_new (escaped);
}
@@ -142,9 +144,13 @@ gs_app_row_refresh (GsAppRow *app_row)
/* join the description lines */
str = gs_app_row_get_description (app_row);
- gs_string_replace (str, "\n", " ");
- gtk_label_set_markup (GTK_LABEL (priv->description_label), str->str);
- g_string_free (str, TRUE);
+ if (str != NULL) {
+ gs_string_replace (str, "\n", " ");
+ gtk_label_set_markup (GTK_LABEL (priv->description_label), str->str);
+ g_string_free (str, TRUE);
+ } else {
+ gtk_label_set_text (GTK_LABEL (priv->description_label), NULL);
+ }
/* add warning */
if (gs_app_get_kind (priv->app) == GS_APP_KIND_FIRMWARE_UPDATE) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]