From 3c0280633ae41bceef802b1eae59560f93f1cffe Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 25 Feb 2010 14:08:05 +0000 Subject: [PATCH] dont start neutrino if font not found git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@414 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7c435d821c0784dabe8eb473985de15f65b69378 Author: Jacek Jendrzej Date: 2010-02-25 (Thu, 25 Feb 2010) ------------------ This commit was generated by Migit --- src/neutrino.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index c1945f5f3..31ede4724 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1977,12 +1977,19 @@ void CNeutrinoApp::SetupFonts() printf("[neutrino] settings font file %s\n", g_settings.font_file); if(access(g_settings.font_file, F_OK)) { - font.filename = strdup(FONTDIR"/neutrino.ttf"); - strcpy(g_settings.font_file, font.filename); - } - else - font.filename = strdup(g_settings.font_file); + if(!access(FONTDIR"/neutrino.ttf", F_OK)){ + font.filename = strdup(FONTDIR"/neutrino.ttf"); + strcpy(g_settings.font_file, font.filename); + } + else{ + fprintf( stderr,"[neutrino] font file [%s] not found\n neutrino exit\n",FONTDIR"/neutrino.ttf"); + _exit(0); + } + } + else{ + font.filename = strdup(g_settings.font_file); + } style[0] = g_fontRenderer->AddFont(font.filename); if(font.name != NULL)