[recipes/inline-editing] Fix an oversight in edit_ingredient
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes/inline-editing] Fix an oversight in edit_ingredient
- Date: Tue, 25 Apr 2017 19:47:00 +0000 (UTC)
commit 5c2548ab7449cef9fe2e1f60e70e689439dffe59
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Apr 25 15:42:15 2017 -0400
Fix an oversight in edit_ingredient
We should be prepared for the possibility that
row->amount could be NULL here, and avoid a
critical warning in that case.
src/gr-ingredients-viewer-row.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-ingredients-viewer-row.c b/src/gr-ingredients-viewer-row.c
index 1cbe5d6..99d9601 100644
--- a/src/gr-ingredients-viewer-row.c
+++ b/src/gr-ingredients-viewer-row.c
@@ -246,7 +246,7 @@ edit_ingredient (GrIngredientsViewerRow *row)
{
g_autofree char *tmp = NULL;
- tmp = g_strconcat (row->amount, " ", row->unit, NULL);
+ tmp = g_strconcat (row->amount ? row->amount : "", " ", row->unit, NULL);
gtk_entry_set_text (GTK_ENTRY (row->unit_entry), tmp);
gtk_entry_set_text (GTK_ENTRY (row->ingredient_entry), row->ingredient);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]