Commit 50d44ca5 authored by michael's avatar michael

Fix crash with av_tree_enumerate(NULL).


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20537 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 956bad63
......@@ -137,10 +137,12 @@ void av_tree_destroy(AVTreeNode *t){
#if 0
void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*cmp)(void *opaque, void *elem), int (*enu)(void *opaque, void *elem)){
if(t){
int v= cmp ? cmp(opaque, t->elem) : 0;
if(v>=0) av_tree_enumerate(t->child[0], opaque, cmp, enu);
if(v==0) enu(opaque, t->elem);
if(v<=0) av_tree_enumerate(t->child[1], opaque, cmp, enu);
}
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment