It's possible that a throbber could get freed while animating.
In that case, stop the animation right away, so we don't keep
running the animation timeout on freed memory.
uint32_t is_stopped : 1;
};
+static void ply_throbber_stop_now (ply_throbber_t *throbber);
+
ply_throbber_t *
ply_throbber_new (const char *image_dir,
const char *frames_prefix)
if (throbber == NULL)
return;
+ if (!throbber->is_stopped)
+ ply_throbber_stop_now (throbber);
+
ply_throbber_remove_frames (throbber);
ply_array_free (throbber->frames);