From 2e1cbd6a60775630a2993f31fcabe017d3c82202 Mon Sep 17 00:00:00 2001 From: stffrdhrn Date: Mon, 8 Aug 2005 13:49:27 +0000 Subject: [PATCH] Do some NULL checks, otherwise we crash when themes dont exist SVN revision: 16071 --- src/bin/e_ipc_handlers.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/bin/e_ipc_handlers.h b/src/bin/e_ipc_handlers.h index 8d0037ac0..b49a47a66 100644 --- a/src/bin/e_ipc_handlers.h +++ b/src/bin/e_ipc_handlers.h @@ -984,7 +984,11 @@ break; int bytes; efd = e_font_default_get(text_class); - data = e_ipc_codec_2str_int_enc(efd->text_class, efd->font, efd->size, &bytes); + if (efd == NULL) + data = NULL; + else + data = e_ipc_codec_2str_int_enc(efd->text_class, efd->font, efd->size, &bytes); + SEND_DATA(E_IPC_OP_FONT_DEFAULT_GET_REPLY); END_STRING(text_class); @@ -4189,7 +4193,11 @@ break; int bytes; ect = e_theme_config_get(category); - data = e_ipc_codec_2str_enc(ect->category, ect->file, &bytes); + if (ect == NULL) + data = NULL; + else + data = e_ipc_codec_2str_enc(ect->category, ect->file, &bytes); + SEND_DATA(E_IPC_OP_THEME_GET_REPLY); END_STRING(category);