Fixed some memory leaks and uses of uninitialized values
This commit is contained in:
parent
48156cb4bf
commit
0cc326bcc9
12 changed files with 28 additions and 21 deletions
|
|
@ -26,7 +26,7 @@ bool TextBoxEditTool::edit_gui(const std::shared_ptr<DrawComponent>& comp) {
|
|||
t.gui.text_label("Text Color");
|
||||
});
|
||||
t.gui.pop_id();
|
||||
bool editHappened = a->d != oldData;
|
||||
bool editHappened = (!oldData.has_value()) || (a->d != oldData);
|
||||
oldData = a->d;
|
||||
return editHappened;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue