[seahorse] gkr-item: Make sure we don't escape NULL label
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] gkr-item: Make sure we don't escape NULL label
- Date: Fri, 20 Aug 2021 12:57:47 +0000 (UTC)
commit ebb3b8c6020995386f3624149c9f5b70a0a1fc99
Author: Niels De Graef <nielsdegraef gmail com>
Date: Fri Aug 20 14:55:29 2021 +0200
gkr-item: Make sure we don't escape NULL label
Normally, a `SecretItem` returning a NULL string for it's label property
is a bug whatsoever. We don't want Seahorse to crash on that however
(or to start spewing CRITICALs), so just make sure we pass an empty
string if this happens.
Fixes https://gitlab.gnome.org/GNOME/seahorse/-/issues/266
gkr/gkr-item.vala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gkr/gkr-item.vala b/gkr/gkr-item.vala
index 79d31f41..def1c5b2 100644
--- a/gkr/gkr-item.vala
+++ b/gkr/gkr-item.vala
@@ -84,7 +84,7 @@ public class Item : Secret.Item, Deletable, Viewable {
owned get {
ensure_item_info ();
var result = new StringBuilder("");
- result.append(Markup.escape_text(this._info.label));
+ result.append(Markup.escape_text(this._info.label ?? ""));
if (this._info.details != null && this._info.details != "") {
result.append("<span size='small' rise='0' foreground='#555555'>\n");
result.append(this._info.details);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]