Abort if prefs structure is NULL when editing outside the current

2001-06-21  Bradford Hovinen  <hovinen@ximian.com>

	* capplets/new-*/main.c (main): Abort if prefs structure is NULL
	when editing outside the current location. Fixes crash when bad
	XML data are supplied.
This commit is contained in:
Bradford Hovinen 2001-06-21 14:48:09 +00:00 committed by Bradford Hovinen (Gdict maintainer)
parent 93e004a93f
commit c894d8e52b
7 changed files with 10 additions and 0 deletions

View file

@ -269,6 +269,7 @@ main (int argc, char **argv)
{
outside_location = TRUE;
do_set_xml (FALSE);
if (prefs == NULL) return -1;
preferences_freeze (prefs);
} else {
outside_location = FALSE;