mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
[console] Check for curses before calling updaters
If curses isn't being used, then there are no entities and thus no components to run. Fixes a segfault when running a server without curses enabled.
This commit is contained in:
parent
0ea5c1fa14
commit
bbd2cdb8c8
1 changed files with 8 additions and 2 deletions
|
@ -146,7 +146,11 @@ enum {
|
||||||
sv_cursor = 8,
|
sv_cursor = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef HAVE_NCURSES
|
||||||
static int use_curses = 1;
|
static int use_curses = 1;
|
||||||
|
#else
|
||||||
|
static int use_curses = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
static view_t sv_view;
|
static view_t sv_view;
|
||||||
static view_t output;
|
static view_t output;
|
||||||
|
@ -840,8 +844,10 @@ C_DrawConsole (void)
|
||||||
{
|
{
|
||||||
// only the status bar is drawn because the inputline and output views
|
// only the status bar is drawn because the inputline and output views
|
||||||
// take care of themselves
|
// take care of themselves
|
||||||
draw_status (status);
|
if (use_curses) {
|
||||||
sv_refresh_windows ();
|
draw_status (status);
|
||||||
|
sv_refresh_windows ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue