Merge lp:~gary-lasker/software-center/fix-crash-lp944875 into lp:software-center

Proposed by Gary Lasker
Status: Merged
Merged at revision: 2814
Proposed branch: lp:~gary-lasker/software-center/fix-crash-lp944875
Merge into: lp:software-center
Diff against target: 28 lines (+6/-2)
1 file modified
softwarecenter/ui/gtk3/panes/installedpane.py (+6/-2)
To merge this branch: bzr merge lp:~gary-lasker/software-center/fix-crash-lp944875
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+96208@code.launchpad.net

Description of the change

Fix an intermittent crash that can happen if the installed view pane has not been built yet when a call to show the spinner is made as a result of a refresh.

To post a comment you must log in.
Michael Vogt (mvo) wrote :

Thanks! Nice and clean.

review: Approve
Gary Lasker (gary-lasker) wrote :

Thanks for the review, Michael!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk3/panes/installedpane.py'
2--- softwarecenter/ui/gtk3/panes/installedpane.py 2012-02-28 13:51:20 +0000
3+++ softwarecenter/ui/gtk3/panes/installedpane.py 2012-03-06 18:22:20 +0000
4@@ -113,6 +113,8 @@
5
6 self.visible_docids = None
7 self.visible_cats = {}
8+
9+ self.installed_spinner_notebook = None
10
11 def init_view(self):
12 if self.view_initialized:
13@@ -215,11 +217,13 @@
14
15 def show_installed_view_spinner(self):
16 """ display the local spinner for the installed view panel """
17- self.installed_spinner_notebook.show_spinner()
18+ if self.installed_spinner_notebook:
19+ self.installed_spinner_notebook.show_spinner()
20
21 def hide_installed_view_spinner(self):
22 """ hide the local spinner for the installed view panel """
23- self.installed_spinner_notebook.hide_spinner()
24+ if self.installed_spinner_notebook:
25+ self.installed_spinner_notebook.hide_spinner()
26
27 def _selected_computer_changed(self, oneconf_pickler, hostid, hostname):
28 if self.current_hostid == hostid:

Subscribers

People subscribed via source and target branches