[banshee] [ThickClient] Add AssertInMainThread calls to debug an NRE
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [ThickClient] Add AssertInMainThread calls to debug an NRE
- Date: Wed, 15 Dec 2010 01:12:48 +0000 (UTC)
commit 1f8651ceb3744a1db46218eb3894206f26cbf15a
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue Dec 14 19:12:06 2010 -0600
[ThickClient] Add AssertInMainThread calls to debug an NRE
.../Banshee.Sources.Gui/SourceModel.cs | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceModel.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceModel.cs
index 8c729f9..f2ce25e 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceModel.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceModel.cs
@@ -194,6 +194,7 @@ namespace Banshee.Sources.Gui
public void AddSource (Source source, TreeIter parent)
{
+ ThreadAssist.AssertInMainThread ();
lock (sync) {
if (Filter != null && !Filter (source)) {
return;
@@ -234,6 +235,7 @@ namespace Banshee.Sources.Gui
public void RemoveSource (Source source)
{
+ ThreadAssist.AssertInMainThread ();
lock (sync) {
TreeIter iter = FindSource (source);
if (!iter.Equals (TreeIter.Zero)) {
@@ -249,6 +251,7 @@ namespace Banshee.Sources.Gui
public void Refresh ()
{
+ ThreadAssist.AssertInMainThread ();
Clear ();
foreach (Source source in ServiceManager.SourceManager.Sources) {
AddSource (source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]