aboutsummaryrefslogtreecommitdiff
path: root/src/application-service-appstore.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-04-07 13:33:33 -0500
committerTed Gould <ted@gould.cx>2011-04-07 13:33:33 -0500
commitd468238c1604073916be2f4e2ec695ec7656f7f8 (patch)
tree0f2a2e6d4541aa62e5f2e50618f4b1c97b886ca6 /src/application-service-appstore.c
parentb07cb5fa2959cb3fef608b4f8e163be0a5a1c79c (diff)
parentb0a027c1d23a80bdee99b119ec10567f51f80b66 (diff)
downloadayatana-indicator-application-d468238c1604073916be2f4e2ec695ec7656f7f8.tar.gz
ayatana-indicator-application-d468238c1604073916be2f4e2ec695ec7656f7f8.tar.bz2
ayatana-indicator-application-d468238c1604073916be2f4e2ec695ec7656f7f8.zip
New upstream release.
∘ Fix the name of "nm-applet" in the overrides file ∘ Handle async tasks being canceled (LP: #752998)
Diffstat (limited to 'src/application-service-appstore.c')
-rw-r--r--src/application-service-appstore.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c
index 25eba69..3e827d5 100644
--- a/src/application-service-appstore.c
+++ b/src/application-service-appstore.c
@@ -432,7 +432,6 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
g_return_if_fail(app != NULL);
GError * error = NULL;
- ApplicationServiceAppstorePrivate * priv = app->appstore->priv;
GVariant * menu = NULL, * id = NULL, * category = NULL,
* status = NULL, * icon_name = NULL, * aicon_name = NULL,
* icon_desc = NULL, * aicon_desc = NULL,
@@ -441,6 +440,11 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
GVariant * properties = g_dbus_proxy_call_finish(G_DBUS_PROXY(source_object), res, &error);
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_error_free (error);
+ return; // Must exit before accessing freed memory
+ }
+
if (app->props_cancel != NULL) {
g_object_unref(app->props_cancel);
app->props_cancel = NULL;
@@ -454,6 +458,8 @@ got_all_properties (GObject * source_object, GAsyncResult * res,
return;
}
+ ApplicationServiceAppstorePrivate * priv = app->appstore->priv;
+
/* Grab all properties from variant */
GVariantIter * iter = NULL;
const gchar * name = NULL;
@@ -1043,6 +1049,11 @@ dbus_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data)
GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error);
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_error_free (error);
+ return; // Must exit before accessing freed memory
+ }
+
if (app->dbus_proxy_cancel != NULL) {
g_object_unref(app->dbus_proxy_cancel);
app->dbus_proxy_cancel = NULL;
@@ -1437,6 +1448,12 @@ approver_proxy_cb (GObject * object, GAsyncResult * res, gpointer user_data)
g_return_if_fail(approver != NULL);
GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error);
+
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_error_free (error);
+ return; // Must exit before accessing freed memory
+ }
+
ApplicationServiceAppstorePrivate * priv = APPLICATION_SERVICE_APPSTORE_GET_PRIVATE (approver->appstore);
if (approver->proxy_cancel != NULL) {