diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-01-04 01:00:11 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-01-04 01:20:20 +0100 |
commit | d65ac7378c77648124e0e8acd09cea8fd0d104cd (patch) | |
tree | 635e19e3e146f2deddeedff7528f1f5b16bc6cac /scene/gui | |
parent | e68965672df8e06a1a6c977d3426b001a0767a9a (diff) |
Fix crash in OS::execute on FreeBSD
As spotted by @robfram, closes #15288.
Also reviewed other uses of `if (String.find(.*))` for potential similar mistakes, found a wrong (and useless) one in ScriptEditorDialog.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/color_picker.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 95298f5a18..63478886c6 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -209,6 +209,7 @@ Color ColorPicker::get_pick_color() const { } void ColorPicker::add_preset(const Color &p_color) { + if (presets.find(p_color)) { presets.move_to_back(presets.find(p_color)); } else { |