13
0

Initialize uninitialized variable

Fixes crash when mapping files cannot be found of read.
This commit is contained in:
Robin Gareus 2023-09-19 18:28:00 +02:00
parent b18533119b
commit f715640aeb
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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;
}
}
}