fix segfault when ini file does not exist

This commit is contained in:
Sebastian Krzyszkowiak 2012-04-08 11:39:27 +02:00
parent efaa1803ea
commit 8eab7da8f1

View file

@ -25,6 +25,7 @@ ALLEGRO_CONFIG *config;
void InitConfig() { void InitConfig() {
config = al_load_config_file("SuperDerpy.ini"); config = al_load_config_file("SuperDerpy.ini");
if (!config) config=al_create_config();
} }
void SetConfigOption(char* section, char* name, char* value) { void SetConfigOption(char* section, char* name, char* value) {