Merge lp:~fhd/unity-2d/fix-for-bug-6600100 into lp:unity-2d
Proposed by
Felix H. Dahlke
Status: | Merged |
---|---|
Approved by: | Florian Boucault |
Approved revision: | 634 |
Merged at revision: | 638 |
Proposed branch: | lp:~fhd/unity-2d/fix-for-bug-6600100 |
Merge into: | lp:unity-2d |
Diff against target: |
157 lines (+77/-21) 2 files modified
libunity-2d-private/src/launcherdevice.cpp (+73/-21) libunity-2d-private/src/launcherdevice.h (+4/-0) |
To merge this branch: | bzr merge lp:~fhd/unity-2d/fix-for-bug-6600100 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Florian Boucault (community) | Approve | ||
Marco Biscaro (community) | Approve | ||
Review via email: mp+70291@code.launchpad.net |
This proposal supersedes a proposal from 2011-08-03.
Description of the change
[launcher] Added a "safely remove" option for USB sticks.
To post a comment you must log in.
16 + if (g_mount_ can_unmount( mount)) { unmount_ with_operation( mount, G_MOUNT_ UNMOUNT_ NONE, mountOperation, NULL, lback) LauncherDevice: :onMountUnmount ed, unref(mount) ;
17 + g_mount_
18 + (GAsyncReadyCal
19 + NULL);
20 + } else {
21 + g_object_
22 + }
The GMount object always need to be unref-ed, not only when if fails to unmount. The code should be something like:
if (mount) { can_unmount( mount)) { unmount_ with_operation( mount, G_MOUNT_ UNMOUNT_ NONE, mountOperation, NULL,
(GAsyncReadyCal lback) LauncherDevice: :onMountUnmount ed,
NULL); unref(mount) ;
if (g_mount_
g_mount_
}
g_object_
}
82 + g_object_ unref(drive) ;
If, for some weird reason, drive is null, we can get in trouble. I think you need to check if this variable is set before trying to unref it.