Merge lp:~mterry/unity-greeter/no-crash-bg-load into lp:unity-greeter

Proposed by Michael Terry
Status: Merged
Merged at revision: 367
Proposed branch: lp:~mterry/unity-greeter/no-crash-bg-load
Merge into: lp:unity-greeter
Diff against target: 33 lines (+4/-1)
1 file modified
src/background.vala (+4/-1)
To merge this branch: bzr merge lp:~mterry/unity-greeter/no-crash-bg-load
Reviewer Review Type Date Requested Status
Ken VanDine Approve
Unity Greeter Development Team Pending
Review via email: mp+98715@code.launchpad.net

Description of the change

See bug for reproduction hack.

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Approve!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/background.vala'
2--- src/background.vala 2012-03-21 19:13:22 +0000
3+++ src/background.vala 2012-03-21 19:40:22 +0000
4@@ -18,7 +18,7 @@
5 * Michael Terry <michael.terry@canonical.com>
6 */
7
8-class BackgroundLoader
9+class BackgroundLoader : Object
10 {
11 public string filename {get; private set;}
12 public Cairo.Surface logo {get; set;}
13@@ -76,10 +76,12 @@
14 {
15 try
16 {
17+ this.ref();
18 thread = Thread<void*>.create<void*> (load_and_scale, true);
19 }
20 catch (ThreadError e)
21 {
22+ this.unref();
23 finished = true;
24 return true;
25 }
26@@ -112,6 +114,7 @@
27 thread.join ();
28 thread = null;
29 finished = true;
30+ this.unref();
31
32 for (var i = 0; i < widths.length; i++)
33 {

Subscribers

People subscribed via source and target branches