Prevent Cinnamon from segfaulting after changing the theme

This prevents a segfault that can happen when opening mockturtl's weather applet's popup (and maybe other applet's popups as well) after changing the theme.