find-world can return f, handle this case, new accessors
parent
b210f43768
commit
d45b7afc3c
|
@ -1,6 +1,8 @@
|
|||
|
||||
USING: ui.backend ui.gadgets.worlds ;
|
||||
USING: accessors kernel ui.backend ui.gadgets.worlds ;
|
||||
|
||||
IN: ui.gadgets.lib
|
||||
|
||||
: find-gl-context ( gadget -- ) find-world world-handle select-gl-context ;
|
||||
ERROR: no-world-found ;
|
||||
: find-gl-context ( gadget -- )
|
||||
find-world dup [ handle>> select-gl-context ] [ no-world-found ] if ;
|
||||
|
|
Loading…
Reference in New Issue