core: fix segv when poping last element

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Release GPaste 3.2.2

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>