va_start should be paired with va_end

Closes https://github.com/mate-desktop/mate-desktop/pull/137
don't leak memory

Closes https://github.com/mate-desktop/mate-desktop/pull/138
avoid dereferencing NULL pointer

Closes https://github.com/mate-desktop/mate-desktop/pull/145
changed checking for NULL a bit

the code below clearly assumes that slide should never be NULL,
so the check is now done via g_return_if_fail

Closes https://github.com/mate-desktop/mate-desktop/pull/143