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:
parent
93e004a93f
commit
c894d8e52b
7 changed files with 10 additions and 0 deletions
|
@ -1,5 +1,9 @@
|
||||||
2001-06-21 Bradford Hovinen <hovinen@ximian.com>
|
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.
|
||||||
|
|
||||||
* capplets/new-*/main.c (do_set_xml): Fix to use correct
|
* capplets/new-*/main.c (do_set_xml): Fix to use correct
|
||||||
termination condition and g_string API
|
termination condition and g_string API
|
||||||
|
|
||||||
|
|
|
@ -280,6 +280,7 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
outside_location = TRUE;
|
outside_location = TRUE;
|
||||||
do_set_xml (FALSE);
|
do_set_xml (FALSE);
|
||||||
|
if (prefs == NULL) return -1;
|
||||||
preferences_freeze (prefs);
|
preferences_freeze (prefs);
|
||||||
} else {
|
} else {
|
||||||
outside_location = FALSE;
|
outside_location = FALSE;
|
||||||
|
|
|
@ -269,6 +269,7 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
outside_location = TRUE;
|
outside_location = TRUE;
|
||||||
do_set_xml (FALSE);
|
do_set_xml (FALSE);
|
||||||
|
if (prefs == NULL) return -1;
|
||||||
preferences_freeze (prefs);
|
preferences_freeze (prefs);
|
||||||
} else {
|
} else {
|
||||||
outside_location = FALSE;
|
outside_location = FALSE;
|
||||||
|
|
|
@ -265,6 +265,7 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
outside_location = TRUE;
|
outside_location = TRUE;
|
||||||
do_set_xml (FALSE);
|
do_set_xml (FALSE);
|
||||||
|
if (prefs == NULL) return -1;
|
||||||
preferences_freeze (prefs);
|
preferences_freeze (prefs);
|
||||||
} else {
|
} else {
|
||||||
outside_location = FALSE;
|
outside_location = FALSE;
|
||||||
|
|
|
@ -384,6 +384,7 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
outside_location = TRUE;
|
outside_location = TRUE;
|
||||||
do_set_xml (FALSE);
|
do_set_xml (FALSE);
|
||||||
|
if (prefs == NULL) return -1;
|
||||||
prefs->frozen++;
|
prefs->frozen++;
|
||||||
} else {
|
} else {
|
||||||
outside_location = FALSE;
|
outside_location = FALSE;
|
||||||
|
|
|
@ -267,6 +267,7 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
outside_location = TRUE;
|
outside_location = TRUE;
|
||||||
do_set_xml (FALSE);
|
do_set_xml (FALSE);
|
||||||
|
if (prefs == NULL) return -1;
|
||||||
preferences_freeze (prefs);
|
preferences_freeze (prefs);
|
||||||
} else {
|
} else {
|
||||||
outside_location = FALSE;
|
outside_location = FALSE;
|
||||||
|
|
|
@ -256,6 +256,7 @@ main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
outside_location = TRUE;
|
outside_location = TRUE;
|
||||||
do_set_xml (FALSE);
|
do_set_xml (FALSE);
|
||||||
|
if (prefs == NULL) return -1;
|
||||||
preferences_freeze (prefs);
|
preferences_freeze (prefs);
|
||||||
} else {
|
} else {
|
||||||
outside_location = FALSE;
|
outside_location = FALSE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue