Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deal with not being able to require 'Cairo' better
Previous the 'gtk_simple_use_cairo' would attempt to require Cairo and would fail silently. In turn the 'add-draw-handler' would then attempt to to use values derived from the module by type lookup amd pass them to a native routine, resulting in an exception in the native code and subsequently a confusing MoarVM panic when they are undefined. This takes a belt and braces approach adding a Bool return to the gtk_simple_use_cairo so user code can check and act appropriately if Cairo can't be loaded, and the add-draw-handler will also throw an exception if called without the module loaded. Fixes #85
- Loading branch information
1 parent
4dadc90
commit 98dc17f
Showing
2 changed files
with
31 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters