networkmonitor netlink: Fix error detection

We currently bail out of initialization if a GError has been passed
to the function, not if it has been set by the previous call.

Until recently this bug disguised errors, but since commit e0b120cc
it causes initialization to always "fail".

https://gitlab.gnome.org/GNOME/glib/issues/1523
diff --git a/gio/gnetworkmonitornetlink.c b/gio/gnetworkmonitornetlink.c
index b308b3b..493ddef 100644
--- a/gio/gnetworkmonitornetlink.c
+++ b/gio/gnetworkmonitornetlink.c
@@ -113,9 +113,10 @@
     }
 
   nl->priv->sock = g_socket_new_from_fd (sockfd, error);
-  if (error)
+  if (nl->priv->sock == NULL)
     {
-      g_prefix_error (error, "%s", _("Could not create network monitor: "));
+      if (error)
+        g_prefix_error (error, "%s", _("Could not create network monitor: "));
       (void) g_close (sockfd, NULL);
       return FALSE;
     }