diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-07-21 07:57:35 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-07-21 07:57:35 +0200 |
commit | 5d5c9713d7eaeace0bae37e56ae2734d5d203194 (patch) | |
tree | 415c1ba57158c142603d9ddd16d0b2a2571ec7dd | |
parent | 8e648e6b6a4180e4c681c96740652f0f297ea7b7 (diff) |
Fix crasher on no scrollbar and mouse seek.
-rw-r--r-- | source/view.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/view.c b/source/view.c index fc47c838..263db655 100644 --- a/source/view.c +++ b/source/view.c @@ -1573,7 +1573,8 @@ static void rofi_view_mainloop_iter ( RofiViewState *state, xcb_generic_event_t case XCB_MOTION_NOTIFY: { xcb_motion_notify_event_t *xme = (xcb_motion_notify_event_t *) ev; - if ( xme->event_x >= state->scrollbar->widget.x && xme->event_x < ( state->scrollbar->widget.x + state->scrollbar->widget.w ) ) { + if ( state->scrollbar != NULL && + xme->event_x >= state->scrollbar->widget.x && xme->event_x < ( state->scrollbar->widget.x + state->scrollbar->widget.w ) ) { state->selected = scrollbar_clicked ( state->scrollbar, xme->event_y ); state->update = TRUE; } |