diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2009-01-04 17:48:19 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2009-01-04 17:48:19 +0000 |
commit | d8bd113ef43a89807a07261b10f1a800caa66c4e (patch) | |
tree | aa54e08f25797043bf67535958530192f3f072ec /libavutil/tree.c | |
parent | 853a97530e0aabfd1474b1679e3dc8be978e5ef8 (diff) | |
download | ffmpeg-d8bd113ef43a89807a07261b10f1a800caa66c4e.tar.gz |
add a termination condition
Originally committed as revision 16422 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/tree.c')
-rw-r--r-- | libavutil/tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/tree.c b/libavutil/tree.c index 64653aaccb..bf485ab3f7 100644 --- a/libavutil/tree.c +++ b/libavutil/tree.c @@ -128,9 +128,11 @@ void *av_tree_insert(AVTreeNode **tp, void *key, int (*cmp)(void *key, const voi } void av_tree_destroy(AVTreeNode *t){ + if(t){ av_tree_destroy(t->child[0]); av_tree_destroy(t->child[1]); av_free(t); + } } #if 0 |