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
Please register or sign in to comment