Skip to content

Commit

Permalink
Fix segfault on stopping USB hard drives
Browse files Browse the repository at this point in the history
Fix #1046
drive_stop_cb should never have used g_drive_poll_for_media_finish which is for
ejectable media in a fixed drive (e.g CD drive) and not for stopping a removable drive
  • Loading branch information
lukefromdc committed Dec 2, 2018
1 parent c12b61b commit 884870c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/caja-places-sidebar.c
Expand Up @@ -2548,7 +2548,7 @@ drive_stop_cb (GObject *source_object,
g_object_unref (window);

error = NULL;
if (!g_drive_poll_for_media_finish (G_DRIVE (source_object), res, &error))
if (!g_drive_stop_finish(G_DRIVE (source_object), res, &error))
{
if (error->code != G_IO_ERROR_FAILED_HANDLED)
{
Expand Down

0 comments on commit 884870c

Please sign in to comment.