void fgSplashInit ( const char *splash_texture ) {
fgRequestRedraw();
- if (!fgGetBool("/sim/startup/splash-screen"))
- return;
-
SG_LOG( SG_GENERAL, SG_INFO, "Initializing splash screen" );
SGPath path(fontpath);
path.append(fontname);
- font.load((char *)path.c_str());
+ if (!font.load((char *)path.c_str())) {
+ SG_LOG( SG_GENERAL, SG_ALERT, "Error loading font " << path.str() );
+ return;
+ }
info.setFont(&font);
info.setPointSize(fontsize);
+ if (!fgGetBool("/sim/startup/splash-screen"))
+ return;
splash.bind();
glEnd();
}
- if (progress_text && fgGetBool("/sim/startup/splash-progress", true)) {
+ if (info.getFont() && progress_text && fgGetBool("/sim/startup/splash-progress", true)) {
glEnable(GL_ALPHA_TEST);
glEnable(GL_BLEND);
glAlphaFunc(GL_GREATER, 0.1f);