diff --git a/src/applet.c b/src/applet.c
index 4f75719..c539c39 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -2863,6 +2863,9 @@ applet_get_device_icon_for_state (NMApplet *applet,
 	NMDeviceState state = NM_DEVICE_STATE_UNKNOWN;
 	NMADeviceClass *dclass;
 
+	g_assert (out_pixbuf && out_icon_name && out_tip);
+	g_assert (!*out_pixbuf && !*out_icon_name && !*out_tip);
+
 	// FIXME: handle multiple device states here
 
 	/* First show the best activating device's state */
@@ -2887,14 +2890,14 @@ applet_get_device_icon_for_state (NMApplet *applet,
 
 		dclass->get_icon (device, state, connection, out_pixbuf, &icon_name, out_tip, applet);
 
-		if (out_icon_name)
-			*out_icon_name = icon_name ? g_strdup (icon_name) : NULL;
-		if (out_pixbuf && !*out_pixbuf && icon_name) {
+
+		if (!*out_pixbuf && icon_name) {
 			*out_pixbuf = nma_icon_check_and_load (icon_name, applet);
 			if (*out_pixbuf)
 				g_object_ref (*out_pixbuf);
 		}
-		if (out_tip && !*out_tip)
+		*out_icon_name = icon_name ? g_strdup (icon_name) : NULL;
+		if (!*out_tip)
 			*out_tip = get_tip_for_device_state (device, state, connection);
 	}
 
