diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-08 03:33:13 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-08 03:33:13 +0200 |
commit | 2848a96d667e35ffca6ef7eaceff2037c5724f7b (patch) | |
tree | 35d42555eb3fa5b3f5a281c7bebc2ecb55dd0b81 /LibGUI/GTableView.cpp | |
parent | aff2fa4383f50271672254fa54f9c9d2511b78e2 (diff) | |
download | serenity-2848a96d667e35ffca6ef7eaceff2037c5724f7b.zip |
GTableView: Fix crash on mousemove when no model is assigned.
Diffstat (limited to 'LibGUI/GTableView.cpp')
-rw-r--r-- | LibGUI/GTableView.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/LibGUI/GTableView.cpp b/LibGUI/GTableView.cpp index 622bbfce77..2a47d6820c 100644 --- a/LibGUI/GTableView.cpp +++ b/LibGUI/GTableView.cpp @@ -149,6 +149,9 @@ void GTableView::mousedown_event(GMouseEvent& event) void GTableView::mousemove_event(GMouseEvent& event) { + if (!model()) + return; + if (m_in_column_resize) { auto delta = event.position() - m_column_resize_origin; int new_width = m_column_resize_original_width + delta.x(); |