Comment 11 for bug 1512120

Created attachment 6515
dont-unref-null.patch

While investigating the bug I came across a glib-critical. Attached is a simple patch which fixes this critical, but probably not the bug itself. Nevertheless it might be somehow related so I post it here.