From f715640aeb42b1dfa57c8d7efecf8c6ae7ef0f13 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 19 Sep 2023 18:28:00 +0200 Subject: [PATCH] Initialize uninitialized variable Fixes crash when mapping files cannot be found of read. --- libs/surfaces/console1/c1_plugin_operations.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/surfaces/console1/c1_plugin_operations.cc b/libs/surfaces/console1/c1_plugin_operations.cc index 791d781dc6..38c28ee1ec 100644 --- a/libs/surfaces/console1/c1_plugin_operations.cc +++ b/libs/surfaces/console1/c1_plugin_operations.cc @@ -76,7 +76,7 @@ Console1::load_mappings () std::string file_path = Glib::build_filename (path, file_name); XMLTree tree; - XMLNode* mapping_xml; + XMLNode* mapping_xml = 0; if (tree.read (file_path)) { mapping_xml = new XMLNode (*(tree.root ())); } else { @@ -446,4 +446,4 @@ Console1::spill_plugins (const int32_t plugin_index) return true; } -} \ No newline at end of file +}