Merge lp://qastaging/~charlesk/indicator-appmenu/lp-1294545 into lp://qastaging/indicator-appmenu/14.04
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Ted Gould (community) | Approve | ||
Review via email:
|
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.
Hmph.
- return;
Seems like a reasonable change, we'll see if we get more info after the fix.