Skip to content
Commit d9cb5f18 authored by Giovanni Campagna's avatar Giovanni Campagna
Browse files

media-keys: don't crash when calling GrabAccelerators with an empty list

If you use an indefinite type like "a*", you must add at least one
element so that GVariant can compute the correct type. Otherwise,
you need to specify the right type from the start.

The empty list is an edge case that can happen if gnome-shell crashes
at startup: gnome-settings-daemon notices that the shell is coming
up, it builds the internal list and calls GrabAccelerator the first
time; this fails because gnome-shell is not ready yet, so g-s-d
installs a timeout to retry; meanwhile g-s goes down again, so
g-s-d clears the list, and the next time the timeout fires g-s-d
crashes.
This fix is not correct, we should actually rebuild the internal
list if we ever get in this state, but as this is only possible
with a shell crashing at startup, let's go with the simple way.

https://bugzilla.gnome.org/show_bug.cgi?id=700091
parent ce2cf0fc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment