projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added using masked drawing for player on walkable tiles in BD engine
[rocksndiamonds.git]
/
src
/
game_bd
/
bd_caveset.c
diff --git
a/src/game_bd/bd_caveset.c
b/src/game_bd/bd_caveset.c
index d83a1b97780a28b9c2eb7854e00a9f7ff4c81931..0ee9c3b82d9ee59208d0bd0b0d2c2bc8f2f6ee25 100644
(file)
--- a/
src/game_bd/bd_caveset.c
+++ b/
src/game_bd/bd_caveset.c
@@
-87,7
+87,8
@@
GdCavesetData *gd_caveset_data_new(void)
gd_struct_set_defaults_from_array(data, gd_caveset_properties, caveset_defaults);
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;
}
return data;
}
@@
-129,7
+130,9
@@
void gd_caveset_clear(void)
// always newly create this
// create pseudo cave containing default values
gd_caveset_data = gd_caveset_data_new();
// 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.
}
// return number of caves currently in memory.