Skip to content

Commit

Permalink
HexEditor: Fix crash of copy action when selection is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
guerinoni authored and awesomekling committed Feb 14, 2022
1 parent 53ff271 commit 932ce93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Applications/HexEditor/HexEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class HexEditor : public GUI::AbstractScrollableWidget {
bool save();

void select_all();
bool has_selection() const { return !((m_selection_end < m_selection_start) || m_document->size()); }
bool has_selection() const { return m_selection_start < m_selection_end && m_document->size() > 0; }
size_t selection_size();
size_t selection_start_offset() const { return m_selection_start; }
bool copy_selected_text_to_clipboard();
Expand Down

0 comments on commit 932ce93

Please sign in to comment.