[gnome-commander] Assert for con->uri!=NULL before using it
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Assert for con->uri!=NULL before using it
- Date: Wed, 28 Dec 2011 22:06:51 +0000 (UTC)
commit f1b9a444c36ff022371107dcbfcb06ed12b52a51
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Wed Dec 28 22:55:54 2011 +0100
Assert for con->uri!=NULL before using it
src/gnome-cmd-con-remote.cc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-con-remote.cc b/src/gnome-cmd-con-remote.cc
index 3dbd2de..55e7808 100644
--- a/src/gnome-cmd-con-remote.cc
+++ b/src/gnome-cmd-con-remote.cc
@@ -81,12 +81,14 @@ static void remote_open (GnomeCmdCon *con)
{
DEBUG('m', "Opening remote connection\n");
- if (!con->base_path)
- con->base_path = new GnomeCmdPlainPath(G_DIR_SEPARATOR_S);
+ g_return_if_fail (con->uri!=NULL);
con->state = GnomeCmdCon::STATE_OPENING;
con->open_result = GnomeCmdCon::OPEN_IN_PROGRESS;
+ if (!con->base_path)
+ con->base_path = new GnomeCmdPlainPath(G_DIR_SEPARATOR_S);
+
g_timeout_add (1, (GSourceFunc) start_get_file_info, con);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]