1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-03-10 17:06:37 -04:00

Fix crasher on no scrollbar and mouse seek.

This commit is contained in:
Dave Davenport 2016-07-21 07:57:35 +02:00
parent 8e648e6b6a
commit 5d5c9713d7

View file

@ -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;
}