find-window: don't bomb if a world has no child. Reported by Joe Groff

db4
Slava Pestov 2009-05-06 23:40:27 -05:00
parent 318552ba60
commit 51fff49708
1 changed files with 3 additions and 1 deletions

View File

@ -145,7 +145,9 @@ SYMBOL: ui-thread
PRIVATE>
: find-window ( quot -- world )
[ windows get values ] dip '[ gadget-child @ ] find-last nip ; inline
[ windows get values ] dip
'[ dup children>> [ ] [ nip first ] if-empty @ ]
find-last nip ; inline
: ui-running? ( -- ? )
\ ui-running get-global ;