falconindy / ponymix

CLI volume control for PulseAudio
MIT License
177 stars 27 forks source link

Fix segfault when an invalid command is issued #22

Closed vodik closed 10 years ago

vodik commented 10 years ago

First check if we actually find an entry inside the action map before processing it further.

falconindy commented 10 years ago

Nice find. This only seems to affect cases where map::lower_bound returns the end of the map. For example, the action 'fooforall' won't trigger a crash, but 'xforall' will.

Merged with a nitpicky whitespace change.