fix possible segfault in assignment
This commit is contained in:
@@ -158,6 +158,10 @@ void fade_out(int iv, int fv, int ms_duration, int steps){
|
||||
step_delta += step_inc;
|
||||
}
|
||||
fd = fopen(backlight_file, "w+");
|
||||
if(!fd){
|
||||
io_error_2(IO_ERROR_OPEN, IO_ERROR_FILE, backlight_dir, backlight_file);
|
||||
return;
|
||||
}
|
||||
fprintf(fd, "%d", fv);
|
||||
|
||||
fclose(fd);
|
||||
|
||||
Reference in New Issue
Block a user