Fix #805 by resetting selected device on failure
authorSoeren Apel <soeren@apelpie.net>
Wed, 22 Jun 2016 16:02:34 +0000 (18:02 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Fri, 24 Jun 2016 21:15:39 +0000 (23:15 +0200)
It can happen that devices can be selected but not used
(permissions problems, connection issues, driver issues, etc.),
so in those cases we want to fail gracefully instead of
segfaulting.
The reason for the segfault is the device selector button
isn't reset in case the device couldn't be opened, causing
the rest of the application to try and work with a device
instance that is actually invalid.

Resetting the device selector when the device failed to
open not only fixes this but also makes the UI more
consistent with the internal state.


No differences found