[smuxi: 21/26] Frontend-GNOME: fix NRE thrown in ChatTreeView.ApplyConfig()
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi: 21/26] Frontend-GNOME: fix NRE thrown in ChatTreeView.ApplyConfig()
- Date: Wed, 14 Oct 2015 16:51:15 +0000 (UTC)
commit c054d4de868c23533b222fae05f668537ba5439f
Author: Mirco Bauer <meebey meebey net>
Date: Thu Oct 8 22:24:20 2015 +0200
Frontend-GNOME: fix NRE thrown in ChatTreeView.ApplyConfig()
When connecting a newer frontend to an older engine (via smuxi-server) it will
throw a NRE in ChatTreeView.ApplyConfig() as the hashtable returns null for the
unknown key and that throws a NullReferenceException for booleans.
This regression was introduced in dfacd123b5d6138c7d9614a596111efce280e207.
src/Frontend-GNOME/Views/ChatTreeView.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Frontend-GNOME/Views/ChatTreeView.cs b/src/Frontend-GNOME/Views/ChatTreeView.cs
index d2a72f7..2427a69 100644
--- a/src/Frontend-GNOME/Views/ChatTreeView.cs
+++ b/src/Frontend-GNOME/Views/ChatTreeView.cs
@@ -217,7 +217,7 @@ namespace Smuxi.Frontend.Gnome
}
ModifyFont(ThemeSettings.FontDescription);
- ActivityColumn.Visible = (bool) config["Interface/ShowActivityCounter"];
+ ActivityColumn.Visible = (bool?) config["Interface/ShowActivityCounter"] ?? true;
}
protected virtual void RenderChatViewIcon(Gtk.TreeViewColumn column,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]