From: Javier Sancho Date: Sun, 24 May 2020 07:02:51 +0000 (+0200) Subject: check font X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=ccf806174807ff53f58505c9b7f399cb9483abca;p=guile-irrlicht.git check font --- diff --git a/irrlicht/device.scm b/irrlicht/device.scm index 2035932..ce97443 100644 --- a/irrlicht/device.scm +++ b/irrlicht/device.scm @@ -73,7 +73,7 @@ (let* ((getVideoDriver (get-irrlicht-proc "getVideoDriver" device)) (driver (getVideoDriver device))) (if (null-object? driver) - (error "In procedure get-video-driver: Driver cannot be created") + (error "In procedure get-video-driver: Driver unavailable") driver))) (define-method (is-window-active? (device )) diff --git a/irrlicht/gui.scm b/irrlicht/gui.scm index e154cb3..65b24bb 100644 --- a/irrlicht/gui.scm +++ b/irrlicht/gui.scm @@ -114,8 +114,11 @@ (getBuiltInFont gui-environment))) (define-method (get-font (gui-environment ) filename) - (let ((getFont (get-irrlicht-proc "getFont" gui-environment))) - (getFont gui-environment filename))) + (let ((getFont (get-irrlicht-proc "getFont" gui-environment)) + (font (getFont gui-environment filename))) + (if (null-object? font) + (error "In procedure get-font: Font unavailable") + font))) (define-method (get-skin (gui-environment )) (let ((getSkin (get-irrlicht-proc "getSkin" gui-environment)))