mirror of https://github.com/mgba-emu/mgba.git
Util: Fix a null-pointer issue when attempting to delete a key
This commit is contained in:
parent
298b7e7a8b
commit
07a3d08b26
1
CHANGES
1
CHANGES
|
@ -42,6 +42,7 @@ Bugfixes:
|
||||||
- Debugger: Fix boundary conditions in tab completion
|
- Debugger: Fix boundary conditions in tab completion
|
||||||
- Video: Fix an issue with very long filenames
|
- Video: Fix an issue with very long filenames
|
||||||
- SDL: Fix boundary conditions for joystick adjustments
|
- SDL: Fix boundary conditions for joystick adjustments
|
||||||
|
- Util: Fix a null-pointer issue when attempting to delete a key
|
||||||
Misc:
|
Misc:
|
||||||
- Qt: Show multiplayer numbers in window title
|
- Qt: Show multiplayer numbers in window title
|
||||||
- Qt: Handle saving input settings better
|
- Qt: Handle saving input settings better
|
||||||
|
|
|
@ -53,10 +53,14 @@ void ConfigurationSetValue(struct Configuration* configuration, const char* sect
|
||||||
struct Table* currentSection = &configuration->root;
|
struct Table* currentSection = &configuration->root;
|
||||||
if (section) {
|
if (section) {
|
||||||
currentSection = HashTableLookup(&configuration->sections, section);
|
currentSection = HashTableLookup(&configuration->sections, section);
|
||||||
if (!currentSection && value) {
|
if (!currentSection) {
|
||||||
currentSection = malloc(sizeof(*currentSection));
|
if (value) {
|
||||||
HashTableInit(currentSection, 0, _sectionDeinit);
|
currentSection = malloc(sizeof(*currentSection));
|
||||||
HashTableInsert(&configuration->sections, section, currentSection);
|
HashTableInit(currentSection, 0, _sectionDeinit);
|
||||||
|
HashTableInsert(&configuration->sections, section, currentSection);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|
Loading…
Reference in New Issue