[banshee/stable-2.6] Dap: avoid NRE when disconnecting Nexus 4 (bgo#722219)
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-2.6] Dap: avoid NRE when disconnecting Nexus 4 (bgo#722219)
- Date: Wed, 15 Jan 2014 00:13:59 +0000 (UTC)
commit 68ebcd3292800a7002c4e5e69c33d564ba22023a
Author: Andrés G. Aragoneses <knocte gmail com>
Date: Wed Jan 15 01:13:38 2014 +0100
Dap: avoid NRE when disconnecting Nexus 4 (bgo#722219)
The previous commit introduced the possibility for Gtk#
to create this class via an IntPtr handle, so in this
case its source field is always null, and therefore we
need to do a null check when destroying.
src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapInfoBar.cs | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapInfoBar.cs
b/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapInfoBar.cs
index 2004eb9..8f6b748 100644
--- a/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapInfoBar.cs
+++ b/src/Dap/Banshee.Dap/Banshee.Dap.Gui/DapInfoBar.cs
@@ -57,8 +57,10 @@ namespace Banshee.Dap.Gui
protected override void OnDestroyed ()
{
base.OnDestroyed ();
- source.Updated -= OnSourceUpdated;
- source = null;
+ if (source != null) {
+ source.Updated -= OnSourceUpdated;
+ source = null;
+ }
}
private void BuildWidget ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]