[gnome-packagekit] trivial: do not allow recursive main loops in the same GpkModalDialog object



commit 00ce4c07788c77c9847a80d510b1ad2b34314393
Author: Richard Hughes <richard hughsie com>
Date:   Wed Mar 3 11:23:21 2010 +0000

    trivial: do not allow recursive main loops in the same GpkModalDialog object

 src/gpk-modal-dialog.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gpk-modal-dialog.c b/src/gpk-modal-dialog.c
index 1ac87a6..43f937e 100644
--- a/src/gpk-modal-dialog.c
+++ b/src/gpk-modal-dialog.c
@@ -514,6 +514,10 @@ gpk_modal_dialog_run (GpkModalDialog *dialog)
 {
 	g_return_val_if_fail (GPK_IS_CLIENT_DIALOG (dialog), FALSE);
 
+	/* already running */
+	if (g_main_loop_is_running (dialog->priv->loop))
+		g_main_loop_quit (dialog->priv->loop);
+
 	dialog->priv->response = GTK_RESPONSE_NONE;
 	g_main_loop_run (dialog->priv->loop);
 



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