Merge lp://staging/~khurshid-alam/unity-control-center/fix-image-preview into lp://staging/unity-control-center

Proposed by Khurshid Alam
Status: Merged
Merged at revision: 12917
Proposed branch: lp://staging/~khurshid-alam/unity-control-center/fix-image-preview
Merge into: lp://staging/unity-control-center
Diff against target: 59 lines (+6/-4)
2 files modified
panels/appearance/cc-appearance-panel.c (+3/-2)
panels/user-accounts/um-photo-dialog.c (+3/-2)
To merge this branch: bzr merge lp://staging/~khurshid-alam/unity-control-center/fix-image-preview
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+359937@code.staging.launchpad.net

Commit message

Fix image preview in GtkFileChooser

g_file_info_get_content_type() returns an internal string, and we were
freeing the file_info we got it from in the next line, so it's a miracle
that the mime_type was ever not garbage.

See https://bugzilla.gnome.org/show_bug.cgi?id=778424

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your work

The corresponding upstream change for the user panel is
https://gitlab.gnome.org/GNOME/gnome-control-center/commit/5c5d6087

Why didn't you take the other parts of the change? The "non-const" seems needed since now mime_type is the return of a g_strdup. The free call is also needed otherwise you leak the dup-ed string

The appareance capplet code is in the same case

review: Needs Fixing
12916. By Khurshid Alam

Use non-const for mime_type and free it as well

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Right, now Fixed.

Revision history for this message
Sebastien Bacher (seb128) wrote :

that's better, thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches