1
0
Fork 0

Fix a bug where current_panel was called before it was initialized properly

This commit is contained in:
ehofman 2003-03-31 08:25:00 +00:00
parent 67ad32267f
commit 58937e7e6b
2 changed files with 2 additions and 0 deletions

View file

@ -57,6 +57,7 @@ FGGlobals::FGGlobals() :
autopilot( NULL ),
route( NULL ),
soundmgr( NULL ),
current_panel( NULL ),
environment_mgr( NULL ),
ATC_mgr( NULL ),
ATC_display( NULL ),

View file

@ -1399,6 +1399,7 @@ void fgReshape( int width, int height ) {
int view_h;
if ( (!fgGetBool("/sim/virtual-cockpit"))
&& (globals->get_current_panel() != NULL)
&& fgPanelVisible() && idle_state == 1000 ) {
view_h = (int)(height * (globals->get_current_panel()->getViewHeight() -
globals->get_current_panel()->getYOffset()) / 768.0);