summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_font.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2008-08-26 05:12:24 +0000
committerjsorg71 <jsorg71>2008-08-26 05:12:24 +0000
commitdf49056579c9539af79a52fa561087c4d4f0deb5 (patch)
tree85cb89c333a6ab51af0ba9b39cbe118d8316fb1a /xrdp/xrdp_font.c
parenta7df159ce9ccdb98cea6597a888392f62035c7d1 (diff)
downloadxrdp-proprietary-df49056579c9539af79a52fa561087c4d4f0deb5.tar.gz
xrdp-proprietary-df49056579c9539af79a52fa561087c4d4f0deb5.zip
fix crash when font file dosen't exist
Diffstat (limited to 'xrdp/xrdp_font.c')
-rw-r--r--xrdp/xrdp_font.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xrdp/xrdp_font.c b/xrdp/xrdp_font.c
index 7b143d43..68d62abd 100644
--- a/xrdp/xrdp_font.c
+++ b/xrdp/xrdp_font.c
@@ -79,6 +79,12 @@ xrdp_font_create(struct xrdp_wm* wm)
DEBUG(("in xrdp_font_create"));
g_snprintf(file_path, 255, "%s/%s", XRDP_SHARE_PATH, DEFAULT_FONT_NAME);
+ if (!g_file_exist(file_path))
+ {
+ g_writeln("xrdp_font_create: error font file [%s] does not exist",
+ file_path);
+ return 0;
+ }
file_size = g_file_get_size(file_path);
if (file_size < 1)
{