diff --git a/src/engine.c b/src/engine.c index 2a034800..c488cb12 100644 --- a/src/engine.c +++ b/src/engine.c @@ -65,10 +65,10 @@ byte Tiling_mode_before_cancel; Func_effect Effect_function_before_cancel; ///This table holds pointers to the saved window backgrounds. We can have up to 8 windows open at a time. -byte* Window_background[8]; +static byte* Window_background[8]; ///Save a screen block (usually before erasing it with a new window or a dropdown menu) -void Save_background(byte **buffer, int x_pos, int y_pos, int width, int height) +static void Save_background(byte **buffer, int x_pos, int y_pos, int width, int height) { int index; if(*buffer != NULL) DEBUG("WARNING : buffer already allocated !!!",0); @@ -79,13 +79,14 @@ void Save_background(byte **buffer, int x_pos, int y_pos, int width, int height) } ///Restores a screen block -void Restore_background(byte *buffer, int x_pos, int y_pos, int width, int height) +static void Restore_background(byte **buffer, int x_pos, int y_pos, int width, int height) { int index; + if(*buffer==NULL) return; for (index=0; index