gd_struct_set_defaults_from_array(data, gd_caveset_properties, caveset_defaults);
- data->levelset_subdir = getStringCopy(leveldir_current->subdir);
+ if (leveldir_current != NULL)
+ data->levelset_subdir = getStringCopy(leveldir_current->subdir);
return data;
}
// always newly create this
// create pseudo cave containing default values
gd_caveset_data = gd_caveset_data_new();
- gd_strcpy(gd_caveset_data->name, leveldir_current->name);
+
+ if (leveldir_current != NULL)
+ gd_strcpy(gd_caveset_data->name, leveldir_current->name);
}
// return number of caves currently in memory.
{
int i, j;
+ if (graphic_info == NULL) // still at startup phase
+ return;
+
// always start with reliable default values
for (i = 0; i < O_MAX_ALL; i++)
{