Merge lp:~gue5t/midori/icon-pixbuf into lp:midori
Status: | Merged |
---|---|
Approved by: | Paweł Forysiuk |
Approved revision: | 7108 |
Merged at revision: | 7109 |
Proposed branch: | lp:~gue5t/midori/icon-pixbuf |
Merge into: | lp:midori |
Diff against target: |
94 lines (+61/-1) 1 file modified
midori/midori-view.c (+61/-1) |
To merge this branch: | bzr merge lp:~gue5t/midori/icon-pixbuf |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paweł Forysiuk | Approve | ||
Review via email: mp+287704@code.launchpad.net |
Commit message
Fix segfaults and type errors introduced in r7105 by incorrect downcasts from GIcon to GdkPixbuf in midori-view.c
Description of the change
Fix segfaults and type errors introduced in r7105 by incorrect downcasts from GIcon to GdkPixbuf in midori-view.c
Specifically, midori-view.c was downcasting a GIcon (which is an interface implemented by both GdkPixbuf and GThemedIcon) to a GdkPixbuf in several places where it isn't always true that the icon actually is a GdkPixbuf—for example, there's no pixbuf underlying GThemedIcons. This led to GObject cast failures and segfaults.
This adds code that explicitly converts GThemedIcon instances to GdkPixbufs to allow storing them in the GdkPixbuf* icon field of MidoriView. I've checked it against GTK2/GTK3 to make sure our scaling behavior for icons is unchanged and checked that extensions work without crashes again.