diff options
author | Denis Gorodnichev <[email protected]> | 2014-05-10 16:37:49 +0400 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-25 12:58:39 +0100 |
commit | 43225d8aaa32cd5aac3c99a1b285d510839f8709 (patch) | |
tree | 97afe766d772616ce327158ef95629a0d54cc820 | |
parent | 56de1bc5727df80bc5f40e44d8df96eee81269ea (diff) | |
download | mate-applets-43225d8aaa32cd5aac3c99a1b285d510839f8709.tar.bz2 mate-applets-43225d8aaa32cd5aac3c99a1b285d510839f8709.tar.xz |
fix drivemount crash
workaround for bug https://bugzilla.gnome.org/show_bug.cgi?id=586392
-rw-r--r-- | drivemount/drive-button.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c index 51f13c1c..94e3ae0f 100644 --- a/drivemount/drive-button.c +++ b/drivemount/drive-button.c @@ -800,18 +800,23 @@ run_command (DriveButton *self, const char *command) g_free (device_path); } +static void dummy_async_ready_callback(GObject *source_object, GAsyncResult *res, gpointer user_data) { + /* do nothing */ +} + static void mount_drive (DriveButton *self, GtkWidget *item) { if (self->volume) { GMountOperation *mount_op = gtk_mount_operation_new (NULL); g_volume_mount (self->volume, G_MOUNT_MOUNT_NONE, - mount_op, NULL, NULL, NULL); + mount_op, NULL, dummy_async_ready_callback, NULL); g_object_unref (mount_op); } else { g_return_if_reached(); } } + static void unmount_drive (DriveButton *self, GtkWidget *item) { @@ -822,12 +827,12 @@ unmount_drive (DriveButton *self, GtkWidget *item) if (mount) { g_mount_unmount_with_operation (mount, G_MOUNT_UNMOUNT_NONE, - NULL, NULL, NULL, NULL); + NULL, NULL, dummy_async_ready_callback, NULL); g_object_unref (mount); } } else if (self->mount) { g_mount_unmount_with_operation (self->mount, G_MOUNT_UNMOUNT_NONE, - NULL, NULL, NULL, NULL); + NULL, NULL, dummy_async_ready_callback, NULL); } else { g_return_if_reached(); } |