From b0ae9341ddfc994f20c3e6734b90546084490df0 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Mon, 28 Jul 2008 23:43:21 +0000 Subject: [PATCH] don't crash when configuration file is not found --- second/config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/second/config.c b/second/config.c index 25a8b4d..8a42339 100644 --- a/second/config.c +++ b/second/config.c @@ -67,7 +67,8 @@ static int8_t *open_config(emile_l2_header_t *info) { printf("ERROR: cannot open configuration file %s\n", property); - return NULL; + configuration[0] = 0; + return configuration; } stream_fstat(stream, &stat); @@ -198,6 +199,8 @@ int read_config(emile_l2_header_t* info, emile_config_t *econfig) if (config_get_property(configuration, "vga", property) != -1) vga_init(property); + else + vga_init("default"); if (config_get_property(configuration, "modem", property) != -1) {