Fix crash when current WM isn't detected.

2002-12-28  Seth Nickell  <snickell@stanford.edu>

	* gnome-theme-manager.c: (update_themes_from_disk):

	Fix crash when current WM isn't detected.
This commit is contained in:
Seth Nickell 2002-12-28 21:46:45 +00:00 committed by Seth Nickell
parent 1634f6307b
commit 87bd7acd10
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2002-12-28 Seth Nickell <snickell@stanford.edu>
* gnome-theme-manager.c: (update_themes_from_disk):
Fix crash when current WM isn't detected.
2002-12-18 Jody Goldberg <jody@gnome.org>
* Release 2.1.5

View file

@ -413,8 +413,13 @@ update_themes_from_disk (GladeXML *dialog)
current_icon_theme = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
wm_settings.flags = GNOME_WM_SETTING_THEME;
gnome_window_manager_get_settings (window_manager, &wm_settings);
current_window_theme = g_strdup (wm_settings.theme);
if (window_manager != NULL) {
gnome_window_manager_get_settings (window_manager, &wm_settings);
current_window_theme = g_strdup (wm_settings.theme);
} else {
current_window_theme = NULL;
}
/* FIXME: What do we really do when there is no theme? Ask Havoc here. */
/* BROKEN BROKEN BROKEN */