NetworkManager r3456 - trunk/src



Author: dcbw
Date: Fri Mar 14 18:51:00 2008
New Revision: 3456
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3456&view=rev

Log:
Don't try to unref a NULL GIOChannel


Modified:
   trunk/src/nm-serial-device.c

Modified: trunk/src/nm-serial-device.c
==============================================================================
--- trunk/src/nm-serial-device.c	(original)
+++ trunk/src/nm-serial-device.c	Fri Mar 14 18:51:00 2008
@@ -304,10 +304,13 @@
 	if (priv->fd) {
 		nm_debug ("Closing device '%s'", nm_device_get_iface (NM_DEVICE (device)));
 
-		g_io_channel_unref (priv->channel);
+		if (priv->channel) {
+			g_io_channel_unref (priv->channel);
+			priv->channel = NULL;
+		}
+
 		ioctl (priv->fd, TCSETA, &priv->old_t);
 		close (priv->fd);
-
 		priv->fd = 0;
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]