main: Destroy GjsContext before exit

Here are a few places where I missed it before: the GjsContext must be
unrefed before exiting, or it will crash on exit.

https://bugzilla.gnome.org/show_bug.cgi?id=778425
This commit is contained in:
Philip Chimento 2017-02-09 18:09:21 -08:00 committed by Philip Chimento
parent ddfdfaed78
commit d017e6749c
2 changed files with 2 additions and 0 deletions

View File

@ -239,6 +239,7 @@ gnome_shell_plugin_start (MetaPlugin *plugin)
* If there was a generic "hook into bug-buddy for non-C crashes" * If there was a generic "hook into bug-buddy for non-C crashes"
* infrastructure, here would be the place to put it. * infrastructure, here would be the place to put it.
*/ */
g_object_unref (gjs_context);
exit (1); exit (1);
} }
} }

View File

@ -360,6 +360,7 @@ list_modes (const char *option_name,
if (!gjs_context_eval (context, script, -1, "<main>", &status, NULL)) if (!gjs_context_eval (context, script, -1, "<main>", &status, NULL))
g_message ("Retrieving list of available modes failed."); g_message ("Retrieving list of available modes failed.");
g_object_unref (context);
exit (status); exit (status);
} }