Commit edd72160 authored by Joshua Lee's avatar Joshua Lee
Browse files

carousel: Fix crash when attempting to scroll on an empty carousel

If there are no pages in a carousel, abandon the attempt at scrolling through
it.

Fixes #231
parent 8a43fd02
Pipeline #298842 passed with stage
in 3 minutes and 14 seconds
......@@ -492,6 +492,9 @@ scroll_cb (AdwCarousel *self,
if (!adw_carousel_get_interactive (self))
return GDK_EVENT_PROPAGATE;
if (adw_carousel_get_n_pages (self) == 0)
return GDK_EVENT_PROPAGATE;
source_device = gtk_event_controller_get_current_event_device (GTK_EVENT_CONTROLLER (controller));
input_source = gdk_device_get_source (source_device);
if (input_source == GDK_SOURCE_TOUCHPAD)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment