Commit bef3ad7
Fix NPEs in MenuItem#calculateRenderSize() and MenuItem#getMonitorZoom()
Previously, calculateRenderSize() and getMonitorZoom() of MenuItem used
getMenu() to get some context providing the relevant shell instead of
getParent(). Since that menu may be null when the MenuItem has no submenu
(e.g., PUSH, CHECK styles), an NPE might have been thrown.
This change replaces getMenu().getShell() with getParent().getShell(),
ensuring a valid shell is always used regardless of item type.
Fixes eclipse-platform#22471 parent fc94eaf commit bef3ad7
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
1294 | | - | |
| 1294 | + | |
1295 | 1295 | | |
1296 | 1296 | | |
1297 | 1297 | | |
| |||
1425 | 1425 | | |
1426 | 1426 | | |
1427 | 1427 | | |
1428 | | - | |
| 1428 | + | |
1429 | 1429 | | |
1430 | 1430 | | |
1431 | 1431 | | |
| |||
0 commit comments