anjuta r4825 - in trunk: . plugins/file-manager
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4825 - in trunk: . plugins/file-manager
- Date: Tue, 3 Mar 2009 12:04:10 +0000 (UTC)
Author: jhs
Date: Tue Mar 3 12:04:10 2009
New Revision: 4825
URL: http://svn.gnome.org/viewvc/anjuta?rev=4825&view=rev
Log:
2009-03-03 Johannes Schmid <jhs gnome org>
* plugins/file-manager/plugin.c (file_manager_set_default_uri):
Fixed critical when no path is set in preferences
Modified:
trunk/ChangeLog
trunk/plugins/file-manager/plugin.c
Modified: trunk/plugins/file-manager/plugin.c
==============================================================================
--- trunk/plugins/file-manager/plugin.c (original)
+++ trunk/plugins/file-manager/plugin.c Tue Mar 3 12:04:10 2009
@@ -81,14 +81,19 @@
file_manager_set_default_uri (AnjutaFileManager* file_manager)
{
GFile *file;
-
- file = g_file_new_for_path (anjuta_preferences_get (file_manager->prefs, PREF_ROOT));
- char *uri = g_file_get_uri (file);
- if (uri)
- g_object_set (G_OBJECT (file_manager->fv), "base_uri", uri, NULL);
- file_manager->have_project = FALSE;
- g_free (uri);
- g_object_unref (file);
+ gchar* path = anjuta_preferences_get (file_manager->prefs, PREF_ROOT);
+
+ if (path)
+ {
+ file = g_file_new_for_path (path);
+ char *uri = g_file_get_uri (file);
+ if (uri)
+ g_object_set (G_OBJECT (file_manager->fv), "base_uri", uri, NULL);
+ file_manager->have_project = FALSE;
+ g_free (uri);
+ g_object_unref (file);
+ }
+ g_free(path);
}
static IAnjutaVcs*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]