Commit a1406058 authored by Philip Van Hoof's avatar Philip Van Hoof

tracker-extract: NB#183307, Crash in quit_timeout_cb when signal_handler calls it

parent 54f293cf
......@@ -119,7 +119,9 @@ quit_timeout_cb (gpointer user_data)
quit_timeout_id = 0;
if (!disable_shutdown) {
g_main_loop_quit (main_loop);
if (main_loop) {
g_main_loop_quit (main_loop);
}
} else {
g_debug ("Would have quit the mainloop");
}
......@@ -201,7 +203,6 @@ signal_handler (int signo)
in_loop = TRUE;
disable_shutdown = FALSE;
quit_timeout_cb (NULL);
/* Fall through */
default:
if (g_strsignal (signo)) {
......@@ -334,6 +335,7 @@ main (int argc, char *argv[])
GError *error = NULL;
TrackerExtract *object;
gchar *log_filename = NULL;
GMainLoop *my_main_loop;
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
......@@ -466,7 +468,10 @@ main (int argc, char *argv[])
main_loop = g_main_loop_new (NULL, FALSE);
tracker_main_quit_timeout_reset ();
g_main_loop_run (main_loop);
g_main_loop_unref (main_loop);
my_main_loop = main_loop;
main_loop = NULL;
g_main_loop_unref (my_main_loop);
g_message ("Shutdown started");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment