pictureviewer.cpp: fix possible segfault

Origin commit data
------------------
Branch: ni/coolstream
Commit: 4f2a24899e
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-05-02 (Wed, 02 May 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-05-02 19:41:24 +02:00
parent 2568d9b11d
commit 0ad404ad4b

View File

@@ -430,16 +430,19 @@ int CPictureViewerGui::show()
}
else if (msg==CRCInput::RC_blue)
{
if ((m_state == MENU) && (!playlist.empty()))
if(!playlist.empty())
{
m_time=(long)time(NULL);
view(selected);
m_state=SLIDESHOW;
} else {
if (m_state == SLIDESHOW)
m_state = VIEW;
else
m_state = SLIDESHOW;
if (m_state == MENU)
{
m_time=(long)time(NULL);
view(selected);
m_state=SLIDESHOW;
} else {
if (m_state == SLIDESHOW)
m_state = VIEW;
else
m_state = SLIDESHOW;
}
}
}
else if (msg==CRCInput::RC_help)