From 7ebce64e8d933e7641bf47d613a906c1c143c02e Mon Sep 17 00:00:00 2001 From: Christophe Bothamy Date: Thu, 30 Jan 2003 18:41:00 +0000 Subject: [PATCH] - exit method does nothing unless specific_init was done --- bochs/gui/x.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bochs/gui/x.cc b/bochs/gui/x.cc index f1459a881..aabc9b556 100644 --- a/bochs/gui/x.cc +++ b/bochs/gui/x.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: x.cc,v 1.60 2003-01-18 12:05:46 vruppert Exp $ +// $Id: x.cc,v 1.61 2003-01-30 18:41:00 cbothamy Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -109,6 +109,8 @@ static void enable_cursor(); static Bit32u convertStringToXKeysym (const char *string); +static bx_bool x_init_done = false; + static Pixmap vgafont[256]; struct { @@ -576,6 +578,8 @@ bx_x_gui_c::specific_init(int argc, char **argv, unsigned tilewidth, unsigned ti BX_PANIC(("vga_x: bits_per_pixel < depth ?")); } + x_init_done = true; + } curr_background = 0; @@ -1419,6 +1423,8 @@ headerbar_click(int x, int y) void bx_x_gui_c::exit(void) { + if (!x_init_done) return; + // Delete the font bitmaps for (int i=0; i<256; i++) { //if (vgafont[i] != NULL)