Commit 265c8661a625a0ca126e5e1ae65cb82a3d032dac
1 parent
077376be
only trigger the if action is not null during walk or destroy
Showing
4 changed files
with
8 additions
and
12 deletions
... | ... | @@ -38,7 +38,9 @@ TR_treeWalk(TR_Tree this, TR_TreeAction action) |
38 | 38 | } |
39 | 39 | |
40 | 40 | if (NULL == TR_TREE_LEFT(node) || previous == TR_TREE_LEFT(node)) { |
41 | - action(node->data, depth); | |
41 | + if (action) { | |
42 | + action(node->data, depth); | |
43 | + } | |
42 | 44 | previous = node; |
43 | 45 | |
44 | 46 | if (NULL != TR_TREE_RIGHT(node)) { | ... | ... |
... | ... | @@ -11,13 +11,13 @@ |
11 | 11 | #define HAVE_MEMORY_H 1 |
12 | 12 | |
13 | 13 | /* Define to 1 if you have the `memset' function. */ |
14 | -#define HAVE_MEMSET 1 | |
14 | +/* #undef HAVE_MEMSET */ | |
15 | 15 | |
16 | 16 | /* Define to 1 if you have the <stdarg.h> header file. */ |
17 | 17 | #define HAVE_STDARG_H 1 |
18 | 18 | |
19 | 19 | /* Define to 1 if stdbool.h conforms to C99. */ |
20 | -#define HAVE_STDBOOL_H 1 | |
20 | +/* #undef HAVE_STDBOOL_H */ | |
21 | 21 | |
22 | 22 | /* Define to 1 if you have the <stdint.h> header file. */ |
23 | 23 | #define HAVE_STDINT_H 1 | ... | ... |
Please
register
or
login
to post a comment