console: fix -vga none -sdl crash
Call get_alloc_displaystate() for proper initialization instead of allocating with g_new(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
a1d2db08d8
commit
333cb18ff4
@ -1580,10 +1580,7 @@ DisplayState *init_displaystate(void)
|
|||||||
gchar *name;
|
gchar *name;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!display_state) {
|
get_alloc_displaystate();
|
||||||
display_state = g_new0(DisplayState, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < nb_consoles; i++) {
|
for (i = 0; i < nb_consoles; i++) {
|
||||||
if (consoles[i]->console_type != GRAPHIC_CONSOLE &&
|
if (consoles[i]->console_type != GRAPHIC_CONSOLE &&
|
||||||
consoles[i]->ds == NULL) {
|
consoles[i]->ds == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user