Merge pull request #215 from houqp/houqp-master
check frontlight before setting intensity
This commit is contained in:
commit
2e8b5cb39c
2 files changed
+11
-11
No files matched your search
+1
-1
@@ -156,7 +156,7 @@ local last_file = G_reader_settings:readSetting("lastfile")
|
||||
|
||||
do
|
||||
local fl = Device:getFrontlight()
|
||||
if fl.restore_settings then
|
||||
if fl and fl.restore_settings then
|
||||
local intensity = G_reader_settings:readSetting("frontlight_intensity")
|
||||
intensity = intensity or fl.intensity
|
||||
fl:setIntensity(intensity)
|
||||
|
||||
Reference in new issue
Block a user