[gnome-commander] tabs: do not call GnomeCmdFileSelector::update_vol_label() for empty tab
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] tabs: do not call GnomeCmdFileSelector::update_vol_label() for empty tab
- Date: Sun, 20 Jun 2010 12:29:40 +0000 (UTC)
commit 38cfbdf442cf5d627338845ae350ecff68d45a67
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun Jun 20 14:28:26 2010 +0200
tabs: do not call GnomeCmdFileSelector::update_vol_label() for empty tab
src/gnome-cmd-file-selector.cc | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 608dda9..c62b452 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -226,9 +226,14 @@ inline void GnomeCmdFileSelector::update_direntry()
inline void GnomeCmdFileSelector::update_vol_label()
{
- g_return_if_fail (GNOME_CMD_IS_CON (get_connection()));
+ GnomeCmdCon *con = get_connection();
- gchar *s = gnome_cmd_con_get_free_space (get_connection(), get_directory(), _("%s free"));
+ if (!con)
+ return;
+
+ g_return_if_fail (GNOME_CMD_IS_CON (con));
+
+ gchar *s = gnome_cmd_con_get_free_space (con, get_directory(), _("%s free"));
gtk_label_set_text (GTK_LABEL (vol_label), s ? s : "");
g_free (s);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]