FIX: Prevent crash when window icon texture is null (#13461) #13466
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #13461
Cinnamon crashes when using WebApps (e.g. WhatsApp installed from Brave Browser) after the app has been running for a while.
When muffin emits a notify::icon signal during idle_update_icon(), the window-list applets call create_icon_texture_for_window() which can return null in race conditions (e.g., when a WebApp window is being destroyed or its icon is unavailable).
Previously, this null value was passed directly to set_child(), causing a SIGSEGV in _clutter_actor_queue_only_relayout(self=0x0).
This fix adds a null check after create_icon_texture_for_window() and falls back to a default icon, preventing the crash.
Tried it with that fix - no crash detected.
Affected applets:
window-list@cinnamon.org
grouped-window-list@cinnamon.org