Merge lp://qastaging/~fhd/unity-2d/fix-for-bug-6600100 into lp://qastaging/unity-2d
Proposed by
Felix H. Dahlke
Status: | Superseded |
---|---|
Proposed branch: | lp://qastaging/~fhd/unity-2d/fix-for-bug-6600100 |
Merge into: | lp://qastaging/unity-2d |
Diff against target: |
152 lines (+73/-20) 2 files modified
libunity-2d-private/src/launcherdevice.cpp (+69/-20) libunity-2d-private/src/launcherdevice.h (+4/-0) |
To merge this branch: | bzr merge lp://qastaging/~fhd/unity-2d/fix-for-bug-6600100 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Biscaro (community) | Needs Fixing | ||
unity-2d-team | Pending | ||
Review via email:
|
This proposal has been superseded by a proposal from 2011-08-03.
Description of the change
Added a "safely remove" option for USB sticks to the launcher.
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.