[monkey-bubble: 28/753] Do not call the parsing routines if we got an empty filename.



commit 2066eeb135aed36beaa5aa3e3a62e10da04dd04d
Author: Miguel de Icaza <miguel nuclecu unam mx>
Date:   Tue Dec 30 02:19:57 1997 +0000

    Do not call the parsing routines if we got an empty filename.
    
    Mon Dec 29 20:40:36 1997  Miguel de Icaza  <miguel nuclecu unam mx>
    
    	* libgnomeui/gnome-init.c (gnome_rc_parse): Do not call the
    	parsing routines if we got an empty filename.

 libgnomeui/gnome-ui-init.c |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/libgnomeui/gnome-ui-init.c b/libgnomeui/gnome-ui-init.c
index 1f8dc27..9928d91 100644
--- a/libgnomeui/gnome-ui-init.c
+++ b/libgnomeui/gnome-ui-init.c
@@ -68,23 +68,31 @@ static void gnome_rc_parse(gchar *command)
 	
 	/* <gnomedatadir>/gtkrc */
 	file = gnome_datadir_file("gtkrc");
-	gtk_rc_parse (file);
-	g_free (file);
+	if (file){
+		gtk_rc_parse (file);
+		g_free (file);
+	}
 
 	/* <gnomedatadir>/<progname> */
 	file = gnome_datadir_file(apprc);
-	gtk_rc_parse (file);
-	g_free (file);
+	if (file){
+		gtk_rc_parse (file);
+		g_free (file);
+	}
 	
 	/* ~/.gnome/gtkrc */
 	file = gnome_util_home_file("gtkrc");
-	gtk_rc_parse (file);
-	g_free (file);
+	if (file){
+		gtk_rc_parse (file);
+		g_free (file);
+	}
 	
 	/* ~/.gnome/<progname> */
 	file = gnome_util_home_file(apprc);
-	gtk_rc_parse (file);
-	g_free (file);
+	if (file){
+		gtk_rc_parse (file);
+		g_free (file);
+	}
 	
 	g_free (apprc);
 }



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