Merge lp:~rastersoft-gmail/slingshot/fixed_die_by_invalid_icon into lp:~elementary-pantheon/slingshot/trunk

Proposed by Sergio Costas on 2014-08-30
Status: Merged
Approved by: Cody Garver on 2014-08-31
Approved revision: 446
Merged at revision: 449
Proposed branch: lp:~rastersoft-gmail/slingshot/fixed_die_by_invalid_icon
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 23 lines (+5/-3)
1 file modified
src/Widgets/AppEntry.vala (+5/-3)
To merge this branch: bzr merge lp:~rastersoft-gmail/slingshot/fixed_die_by_invalid_icon
Reviewer Review Type Date Requested Status
elementary Pantheon team 2014-08-30 Pending
Review via email: mp+232797@code.launchpad.net

Commit message

Avoid invalid icons

Description of the change

When an icon is invalid (like with PyCrust), slingshot dies. This patch fixes it.

To post a comment you must log in.
Julián Unrrein (junrrein) wrote :

To any potential reviewer(s):

This patch is included in https://code.launchpad.net/~rastersoft-gmail/slingshot/fixed_width_fix/+merge/232790

So only review this if the other patch is rejected. If that branch is merged, then just simply delete this merge proposal.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Widgets/AppEntry.vala'
2--- src/Widgets/AppEntry.vala 2014-08-27 19:39:55 +0000
3+++ src/Widgets/AppEntry.vala 2014-08-30 21:06:25 +0000
4@@ -101,8 +101,10 @@
5 base.draw (cr);
6
7 // Draw icon
8- Gdk.cairo_set_source_pixbuf (cr, icon, (icon.width - size.width) / -2.0, 10);
9- cr.paint_with_alpha (alpha);
10+ if (icon != null) {
11+ Gdk.cairo_set_source_pixbuf (cr, icon, (icon.width - size.width) / -2.0, 10);
12+ cr.paint_with_alpha (alpha);
13+ }
14
15 return true;
16
17@@ -112,4 +114,4 @@
18 application.launch ();
19 app_launched ();
20 }
21-}
22\ No newline at end of file
23+}

Subscribers

People subscribed via source and target branches