quick fix to stop OSD from crashing if we try to print a line to the OSD before the frontend is fully initialized

This commit is contained in:
zeromus 2019-03-17 22:53:40 -04:00
parent ed92e1ef68
commit 72ecc8e66c
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,7 @@ BaseDriver::~BaseDriver()
void BaseDriver::AddLine(const char *fmt, ...)
{
#if HAVE_LIBAGG
if(!osd) return;
va_list list;
va_start(list,fmt);
osd->addLine(fmt,list);
@ -61,6 +62,7 @@ void BaseDriver::AddLine(const char *fmt, ...)
void BaseDriver::SetLineColor(u8 r, u8 b, u8 g)
{
#if HAVE_LIBAGG
if(!osd) return;
osd->setLineColor(r,b,g);
#endif
}