diff options
author | Thomas White <taw@bitwiz.org.uk> | 2016-03-14 23:24:00 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2016-03-14 23:24:00 +0100 |
commit | 8d69fd3d476179768d9e13d79261c5a1a7cacda4 (patch) | |
tree | cc4ab748be126479be943eeb4d1854a045d5a6d8 /src/frame.c | |
parent | c900972b5752c6fd10ca01a5789dc969f2648811 (diff) |
Fix frame creation
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c index c1dfd39..5b932e6 100644 --- a/src/frame.c +++ b/src/frame.c @@ -195,3 +195,18 @@ void delete_subframe(struct frame *top, struct frame *fr) parent->num_children--; } + +struct frame *find_frame_with_scblocks(struct frame *fr, SCBlock *scblocks) +{ + int i; + + if ( fr->scblocks == scblocks ) return fr; + + for ( i=0; i<fr->num_children; i++ ) { + struct frame *tt; + tt = find_frame_with_scblocks(fr->children[i], scblocks); + if ( tt != NULL ) return tt; + } + + return NULL; +} |