ui: Dont resize screen if no UIs are attached

This prevents a race condition when a UI attaches early in the program and can
receive redraw commands for a invalid screen
This commit is contained in:
Thiago de Arruda 2015-01-08 10:42:12 -03:00
parent 869c734890
commit a8fe32040b

View File

@ -167,6 +167,10 @@ void ui_cursor_shape(void)
void ui_refresh(void)
{
if (!ui_count) {
return;
}
width = height = INT_MAX;
for (size_t i = 0; i < ui_count; i++) {