fix crash when setting LED without opened device