diff --git a/shell/e-shell.c b/shell/e-shell.c
index 82b6242..9da9e97 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -412,6 +412,8 @@ shell_ready_for_quit (EShell *shell,
 	list = g_list_copy (gtk_application_get_windows (application));
 	g_list_foreach (list, (GFunc) gtk_widget_destroy, NULL);
 	g_list_free (list);
+
+	gtk_main_quit ();
 }
 
 static void
