poliva / lightum

MacBook automatic light sensor daemon
GNU General Public License v2.0
96 stars 29 forks source link

Type checking for g_variant_get calls #44

Open skystrife opened 9 years ago

skystrife commented 9 years ago

Currently the calls to g_variant_get() just assume that the format string works, but don't check that this is in fact the case.

On my system, the results are all string types (since there's an error), but the code was continuing as if nothing happened. With this change, it correctly falls back to using the xbacklight backend.

(This also has inconsequential whitespace changes; I can re-make the PR without those if you want. They are a separate commit.)

esoleyman commented 9 years ago

I like the changes. I have been waiting on poliva to release a new version for the past 6 months. I hope he will be able to see the PR and merge.