Make sure led_font isn't used unless it's initialized.
This commit is contained in:
parent
de0f20aa22
commit
a53ccae248
1 changed files with 3 additions and 3 deletions
|
@ -165,8 +165,8 @@ FGCroppedTexture::getTexture ()
|
|||
|
||||
FGPanel * current_panel = NULL;
|
||||
static fntRenderer text_renderer;
|
||||
static fntTexFont *default_font;
|
||||
static fntTexFont *led_font;
|
||||
static fntTexFont *default_font = 0;
|
||||
static fntTexFont *led_font = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
@ -946,7 +946,7 @@ FGTextLayer::draw ()
|
|||
if (test()) {
|
||||
glColor4fv(_color);
|
||||
transform();
|
||||
if ( _font_name == "led" ) {
|
||||
if ( _font_name == "led" && led_font != 0) {
|
||||
text_renderer.setFont(led_font);
|
||||
} else {
|
||||
text_renderer.setFont(guiFntHandle);
|
||||
|
|
Loading…
Add table
Reference in a new issue