Merge lp://qastaging/~charlesk/indicator-appmenu/lp-1294545 into lp://qastaging/indicator-appmenu/14.04

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 258
Merged at revision: 257
Proposed branch: lp://qastaging/~charlesk/indicator-appmenu/lp-1294545
Merge into: lp://qastaging/indicator-appmenu/14.04
Diff against target: 135 lines (+23/-26)
2 files modified
src/indicator-appmenu.c (+9/-26)
src/window-menu.c (+14/-0)
To merge this branch: bzr merge lp://qastaging/~charlesk/indicator-appmenu/lp-1294545
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Ted Gould (community) Approve
Review via email: mp+211742@code.qastaging.launchpad.net

Commit message

Don't dereference a NULL WindowMenu pointer.

Description of the change

Don't dereference a NULL WindowMenu pointer.

First, this patch adds IS_WINDOW_MENU() safeguards to the public WindowMenu functions to ensure that we don't crash by touching an invalid WindowMenu. This should solve the surface crash, at least.

Second, there's a question of why the iapp has a bad pointer in the first place. The code seems pretty solid: the wm field is a weak reference, the real reference is owned by the apps hashtable, and the code seems to keep the two in sync at all times. One weakness I saw in code inspection was in the window unregister code, which could (under tortured circumstances) unref a WM without removing it from the apps hashtable. So I've plugged that here too.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Hmph.

- return;

Seems like a reasonable change, we'll see if we get more info after the fix.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

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