From 9a76fdf04ea59e7e5e596dfa251d47c679a221b3 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Fri, 29 Aug 2014 21:53:06 -0400 Subject: [PATCH] don't set lights for nonexistent lights duh. --- src/arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp b/src/arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp index 47b65843c9..e72121417a 100644 --- a/src/arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp +++ b/src/arch/Lights/LightsDriver_Linux_PIUIO_Leds.cpp @@ -60,6 +60,8 @@ namespace { bool SetLight(const char *filename, bool on) { + if (filename == NULL) + return true; FILE *f = fopen(filename, "w"); if (f == NULL) {