# HG changeset patch # User ib # Date 1307373084 0 # Node ID e413b573e4eccc63d338d080cd987f351ec2a82a # Parent a5a0019e1c28752b402010e23ccabf29a029d05a Check error when creating the GUI config object. diff -r a5a0019e1c28 -r e413b573e4ec gui/cfg.c --- a/gui/cfg.c Mon Jun 06 14:55:06 2011 +0000 +++ b/gui/cfg.c Mon Jun 06 15:11:24 2011 +0000 @@ -267,6 +267,12 @@ mp_msg(MSGT_GPLAYER, MSGL_V, "[cfg] reading config file: %s\n", cfg); gui_conf = m_config_new(); + + if (!gui_conf) { + gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_MemAllocFailed); + guiExit(EXIT_ERROR); + } + m_config_register_options(gui_conf, gui_opts); if (!disable_gui_conf && (m_config_parse_config_file(gui_conf, cfg) < 0)) {