[gnome-commander] GnomeCmdFile: fix for crash when creating a new dir from an uri
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] GnomeCmdFile: fix for crash when creating a new dir from an uri
- Date: Thu, 14 Apr 2011 18:22:14 +0000 (UTC)
commit e19c3d82fe31fd9df20f16b47a9e00686017da24
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Thu Apr 14 20:17:49 2011 +0200
GnomeCmdFile: fix for crash when creating a new dir from an uri
The crash was caused by passing a pointer to local object
when calling gnome_cmd_dir_new (get_home_con(), &path), sigh...
src/gnome-cmd-file.cc | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index 924e7d5..0940cc9 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -176,8 +176,7 @@ GnomeCmdFile *gnome_cmd_file_new_from_uri (GnomeVFSURI *uri)
GnomeVFSURI *parent = gnome_vfs_uri_get_parent (uri);
gchar *parent_path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path(parent), "");
- GnomeCmdPlainPath path(parent_path);
- GnomeCmdDir *dir = gnome_cmd_dir_new (get_home_con(), &path);
+ GnomeCmdDir *dir = gnome_cmd_dir_new (get_home_con(), new GnomeCmdPlainPath(parent_path));
g_free (parent_path);
gnome_vfs_uri_unref (parent);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]