[gnome-commander/gcmd-1-3] Fixed problem #603301 (crash when cancelling symlink creation by ESC)



commit 63c386448bec9502f2f93375bcb4b0b0f69c6148
Author: Mamoru Tasaka <mtasaka ioa s u-tokyo ac jp>
Date:   Wed Dec 2 23:26:15 2009 +0100

    Fixed problem #603301 (crash when cancelling symlink creation by ESC)

 libgcmd/gnome-cmd-dialog.c        |    1 +
 libgcmd/gnome-cmd-string-dialog.c |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libgcmd/gnome-cmd-dialog.c b/libgcmd/gnome-cmd-dialog.c
index ce89824..97a21a1 100644
--- a/libgcmd/gnome-cmd-dialog.c
+++ b/libgcmd/gnome-cmd-dialog.c
@@ -63,6 +63,7 @@ static void destroy (GtkObject *object)
         (*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
 
     g_free (dialog->priv);
+    dialog->priv = NULL;
 }
 
 
diff --git a/libgcmd/gnome-cmd-string-dialog.c b/libgcmd/gnome-cmd-string-dialog.c
index 4ab5fab..77d824e 100644
--- a/libgcmd/gnome-cmd-string-dialog.c
+++ b/libgcmd/gnome-cmd-string-dialog.c
@@ -82,8 +82,11 @@ destroy (GtkObject *object)
     if (GTK_OBJECT_CLASS (parent_class)->destroy)
         (*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
 
-    g_free (dialog->priv->error_desc);
+    if (dialog->priv)
+        g_free (dialog->priv->error_desc);
+ 
     g_free (dialog->priv);
+    dialog->priv = NULL;
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]