shared/mainloop-glib: Fix calling g_main_loop_quit with NULL

This produces warnings such as:

(process:5122): GLib-CRITICAL **: g_main_loop_quit: assertion 'loop != NULL' failed
1 file changed