Fix crash in RichTextLabel::selection_copy()
This commit is contained in:
parent
146bdf031d
commit
658fb0a0a9
2 changed files with 3 additions and 3 deletions
|
@ -1822,7 +1822,7 @@ bool RichTextLabel::search(const String &p_string, bool p_from_selection) {
|
||||||
|
|
||||||
void RichTextLabel::selection_copy() {
|
void RichTextLabel::selection_copy() {
|
||||||
|
|
||||||
if (!selection.enabled)
|
if (!selection.active || !selection.enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
String text;
|
String text;
|
||||||
|
|
|
@ -256,8 +256,8 @@ private:
|
||||||
Item *to;
|
Item *to;
|
||||||
int to_char;
|
int to_char;
|
||||||
|
|
||||||
bool active;
|
bool active; // anything selected? i.e. from, to, etc. valid?
|
||||||
bool enabled;
|
bool enabled; // allow selections?
|
||||||
};
|
};
|
||||||
|
|
||||||
Selection selection;
|
Selection selection;
|
||||||
|
|
Loading…
Reference in a new issue