]> git.mxchange.org Git - flightgear.git/commitdiff
Fix a bug where current_panel was called before it was initialized properly
authorehofman <ehofman>
Mon, 31 Mar 2003 08:25:00 +0000 (08:25 +0000)
committerehofman <ehofman>
Mon, 31 Mar 2003 08:25:00 +0000 (08:25 +0000)
src/Main/globals.cxx
src/Main/main.cxx

index a1560f613be607d4088bc4ee344caf33862e22e8..34432d99b64c31489015d38e72d766e5c7bc979f 100644 (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 ),
index ab2ded38fa7f3929025619fd656ef36ec87cc266..86a0303277e57b39548ad03801012359c7afd422 100644 (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);