[mistelix] Dispose only if the objects are created
- From: Jordi Mas <jmas src gnome org>
- To: svn-commits-list gnome org
- Subject: [mistelix] Dispose only if the objects are created
- Date: Mon, 20 Jul 2009 04:41:42 +0000 (UTC)
commit 23d9250211bfb05b6d96ba4e42fd51ccd3aade7e
Author: Jordi Mas <jmas softcatala org>
Date: Mon Jul 20 06:41:38 2009 +0200
Dispose only if the objects are created
src/widgets/FileView.cs | 6 ++++--
src/widgets/ProjectElementView.cs | 4 +++-
2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/widgets/FileView.cs b/src/widgets/FileView.cs
index 4447e02..5f1e65a 100644
--- a/src/widgets/FileView.cs
+++ b/src/widgets/FileView.cs
@@ -118,8 +118,10 @@ namespace Mistelix.Widgets
return false;
});
- thumbnailing.CancelAsync ();
- thumbnailing.Dispose ();
+ if (thumbnailing != null) {
+ thumbnailing.CancelAsync ();
+ thumbnailing.Dispose ();
+ }
}
public void LoadElements ()
diff --git a/src/widgets/ProjectElementView.cs b/src/widgets/ProjectElementView.cs
index 0b07c98..7a9bcc7 100644
--- a/src/widgets/ProjectElementView.cs
+++ b/src/widgets/ProjectElementView.cs
@@ -103,7 +103,9 @@ namespace Mistelix.Widgets
Logger.Debug ("ProjectElementView.Disposing");
ClearElements ();
def_image.Dispose ();
- thumbnailing.Dispose ();
+
+ if (thumbnailing != null)
+ thumbnailing.Dispose ();
}
void HandleDragDataGet (object sender, DragDataGetArgs args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]