Skip to content

gs-common: Fix use of NULL GMainLoop pointer after unmapping dialog

shutdown_loop() gets called 1–2 times when getting rid of this common dialog. Typically it gets called by the response signal then the unmap signal. Sometimes only by unmap. The unmap signal is emitted after g_main_loop_run() has returned and the reference to the GMainLoop dropped. This results in shutdown_loop() being called with a NULL GMainLoop pointer.

Avoid that by checking whether the pointer is NULL before trying to quit the loop again.

Spotted and diagnosed by Sid.

In the long term the gs_app_notify_unavailable() and gs_utils_ask_user_accepts() APIs should be reworked to be async, but that’s not a backportable fix.

Signed-off-by: Philip Withnall pwithnall@gnome.org

Fixes: #2740 (closed)

Closes #2740 (closed)

Edited by Philip Withnall

Merge request reports

Loading