[gnome-control-center/gnome-3-8] Handle repeated commandline parsing properly



commit 3d9a9dadf40a1f4c0d540b38cb7c8da411995e82
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri May 17 21:34:50 2013 -0400

    Handle repeated commandline parsing properly
    
    The control-center may call g_option_context_parse repeatedly,
    so we need to reset the static variables used to hold the parsing
    results, otherwise things like the search string may leak from
    a previous parsing run.
    https://bugzilla.gnome.org/show_bug.cgi?id=700362

 shell/cc-application.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/shell/cc-application.c b/shell/cc-application.c
index 7d63768..529e4cf 100644
--- a/shell/cc-application.c
+++ b/shell/cc-application.c
@@ -118,6 +118,15 @@ cc_application_command_line (GApplication *application,
   g_option_context_add_group (context, gtk_get_option_group (TRUE));
   g_option_context_set_help_enabled (context, FALSE);
 
+  start_panels = NULL;
+  search_str = NULL;
+  show_overview = FALSE;
+  verbose = FALSE;
+  show_help = FALSE;
+  show_help_gtk = FALSE;
+  show_help_all = FALSE;
+  list_panels = FALSE;
+
   if (g_option_context_parse (context, &argc, &argv, &error) == FALSE)
     {
       g_print (_("%s\nRun '%s --help' to see a full list of available command line options.\n"),


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