mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix some reference counters (memleak) (#8981)
Fix some reference counters (memleak) Map::dispatchEvent: Allocation safety using references
This commit is contained in:
parent
d77ea76476
commit
26b39f1eae
12 changed files with 30 additions and 37 deletions
|
@ -1208,12 +1208,14 @@ void GUIFormSpecMenu::createTextField(parserData *data, FieldSpec &spec,
|
|||
true, Environment, this, spec.fid, rect, is_editable, is_multiline);
|
||||
e->drop();
|
||||
} else {
|
||||
if (is_multiline)
|
||||
if (is_multiline) {
|
||||
e = new GUIEditBoxWithScrollBar(spec.fdefault.c_str(), true,
|
||||
Environment, this, spec.fid, rect, is_editable, true);
|
||||
else if (is_editable)
|
||||
e->drop();
|
||||
} else if (is_editable) {
|
||||
e = Environment->addEditBox(spec.fdefault.c_str(), rect, true,
|
||||
this, spec.fid);
|
||||
}
|
||||
}
|
||||
|
||||
if (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue