From ccf806174807ff53f58505c9b7f399cb9483abca Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Sun, 24 May 2020 09:02:51 +0200 Subject: [PATCH] check font --- irrlicht/device.scm | 2 +- irrlicht/gui.scm | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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))) -- 2.39.5