Skip to content
This repository has been archived by the owner on Apr 18, 2020. It is now read-only.

Commit

Permalink
Allow calling FileAdapter.Dispose multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
gburt committed Sep 17, 2010
1 parent 73442d0 commit 86bde46
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gio/FileAdapter.custom
Expand Up @@ -53,10 +53,12 @@ public System.Uri Uri {
bool disposed = false;
public void Dispose ()
{
disposed = true;
var o = GLib.Object.GetObject (Handle, false);
if (o != null)
o.Dispose ();
if (!disposed) {
disposed = true;
var o = GLib.Object.GetObject (Handle, false);
if (o != null)
o.Dispose ();
}
}

~FileAdapter ()
Expand Down

0 comments on commit 86bde46

Please sign in to comment.