Should free the error with `g_error_free()` here.
Also, I don't think we should `g_error()` here, as that will make the program abort. Using `g_critical()` sounds better.