aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-12-06 15:29:03 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-12-06 15:29:31 +0100
commit4b306b7c936187245f01e0f948c22ca82e1c5288 (patch)
tree68d5a74c9977d4e7dfb5ce3a3c67885ccbd64ae9
parent8e2958051d4db88fcc67f77a44fddeab7e3b06c0 (diff)
downloadfiv-4b306b7c936187245f01e0f948c22ca82e1c5288.tar.gz
fiv-4b306b7c936187245f01e0f948c22ca82e1c5288.tar.xz
fiv-4b306b7c936187245f01e0f948c22ca82e1c5288.zip
Don't crash the view when no image is present
-rw-r--r--fastiv-view.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fastiv-view.c b/fastiv-view.c
index bd00f82..3f5ae73 100644
--- a/fastiv-view.c
+++ b/fastiv-view.c
@@ -504,7 +504,7 @@ start_animating(FastivView *self)
stop_animating(self);
GdkFrameClock *clock = gtk_widget_get_frame_clock(GTK_WIDGET(self));
- if (!clock ||
+ if (!clock || !self->image ||
!cairo_surface_get_user_data(self->page, &fastiv_io_key_frame_next))
return;