changeset 33480:e413b573e4ec

Check error when creating the GUI config object.
author ib
date Mon, 06 Jun 2011 15:11:24 +0000
parents a5a0019e1c28
children de7945cbcfa0
files gui/cfg.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)) {