fb_generic: avoid possible crash on shutdown

Observed on generic platform.
This commit is contained in:
2019-10-27 16:24:47 +01:00
parent 7c7578741b
commit 600230c1c2

View File

@@ -1559,6 +1559,8 @@ bool CFrameBuffer::showFrame(const std::string & filename, int fallback_mode)
if (access(picture.c_str(), F_OK) == 0) if (access(picture.c_str(), F_OK) == 0)
{ {
if (videoDecoder)
{
#if HAVE_COOL_HARDWARE //FIXME: inside libcs no return value available #if HAVE_COOL_HARDWARE //FIXME: inside libcs no return value available
videoDecoder->ShowPicture(picture.c_str()); videoDecoder->ShowPicture(picture.c_str());
ret = true; ret = true;
@@ -1567,6 +1569,9 @@ bool CFrameBuffer::showFrame(const std::string & filename, int fallback_mode)
ret = true; ret = true;
#endif #endif
} }
else
dprintf(DEBUG_NORMAL,"[CFrameBuffer]\[%s - %d], no videoplayer instance available\n", __func__, __LINE__);
}
else else
{ {
dprintf(DEBUG_NORMAL,"[CFrameBuffer]\[%s - %d], image not found: %s\n", __func__, __LINE__, picture.c_str()); dprintf(DEBUG_NORMAL,"[CFrameBuffer]\[%s - %d], image not found: %s\n", __func__, __LINE__, picture.c_str());