Prevent error pileup
authorMatthias Clasen <mclasen@redhat.com>
Sun, 17 Oct 2010 03:30:30 +0000 (23:30 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 17 Oct 2010 03:31:30 +0000 (23:31 -0400)
gio/glib-compile-schemas.c

index f5e8d1c..7fe907c 100644 (file)
@@ -502,8 +502,7 @@ key_state_start_aliases (KeyState  *state,
     g_set_error_literal (error, G_MARKUP_ERROR,
                          G_MARKUP_ERROR_INVALID_CONTENT,
                          "<aliases> already specified for this key");
-
-  if (!state->is_flags && !state->is_enum && !state->has_choices)
+  else if (!state->is_flags && !state->is_enum && !state->has_choices)
     g_set_error_literal (error, G_MARKUP_ERROR,
                          G_MARKUP_ERROR_INVALID_CONTENT,
                          "<aliases> can only be specified for keys with "
@@ -1645,6 +1644,7 @@ parse_gschema_files (gchar    **files,
 
           /* let them know */
           fprintf (stderr, "%s: %s.  ", filename, error->message);
+          g_clear_error (&error);
 
           if (strict)
             {