summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playtree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/playtree.c b/playtree.c
index ea3ec60ed6..f29cf0b287 100644
--- a/playtree.c
+++ b/playtree.c
@@ -441,7 +441,8 @@ play_tree_iter_new(play_tree_t* pt,m_config_t* config) {
void
play_tree_iter_free(play_tree_iter_t* iter) {
-
+
+ if ( !iter ) return;
#ifdef MP_DEBUG
assert(iter != NULL);
#endif
@@ -460,6 +461,7 @@ int
play_tree_iter_step(play_tree_iter_t* iter, int d,int with_nodes) {
play_tree_t* pt;
+ if ( !iter ) return PLAY_TREE_ITER_ERROR;
#ifdef MP_DEBUG
assert(iter != NULL);
assert(iter->root != NULL);