Repository navigation
fix: don't crash on tray.setContextMenu(null) - #14322
Conversation
2963698 to
a13e578
Compare
|
@ckerr, @codebytere can you please review? |
a13e578 to
764c8ac
Compare
| void Tray::SetContextMenu(v8::Isolate* isolate, mate::Handle<Menu> menu) { | ||
| menu_.Reset(isolate, menu.ToV8()); | ||
| tray_icon_->SetContextMenu(menu->model()); | ||
| tray_icon_->SetContextMenu(menu.IsEmpty() ? nullptr : menu->model()); |
There was a problem hiding this comment.
Can menu->model() just return a nullptr when it's empty?
There was a problem hiding this comment.
menu itself is empty reference
|
I'd like eventually to move away from using |
|
Merging this PR -- these CI failures are known glitches & are not related to this PR. |
|
Release Notes Persisted
|
|
We have automatically backported this PR to "1-8-x", please check out #14329 |
|
We have automatically backported this PR to "2-0-x", please check out #14330 |
|
We have automatically backported this PR to "3-0-x", please check out #14331 |
Description of Change
Fixes #14188
Checklist
npm testpassesRelease Notes
Notes: Fixed crash on
tray.setContextMenu(null).