Update slideshowMusic.lua

Test if old_view is nil
This commit is contained in:
supertobi
2016-01-04 22:52:31 +01:00
parent d4cc869227
commit 92dcb29010

View File

@@ -59,7 +59,7 @@ local function playSlideshowMusic(_, old_view, new_view)
--dt.print_error(playCommand)
coroutine.yield("RUN_COMMAND", playCommand)
else
if (old_view.id == "slideshow") then
if (old_view and old_view.id == "slideshow") then
stopCommand = "rhythmbox-client --pause"
--dt.print_error(stopCommand)
coroutine.yield("RUN_COMMAND", stopCommand)