Diff between c13aee2b1fd045df0e5181f70d574fec99b26b3a and f0c8fed3060150f436ebd9e59e45b262cde89bae

Changed Files

File Additions Deletions Status
plugins/hostname.c +6 -0 modified

Full Patch

diff --git a/plugins/hostname.c b/plugins/hostname.c
index 0b75fac..74c25df 100644
--- a/plugins/hostname.c
+++ b/plugins/hostname.c
@@ -117,6 +117,12 @@ static void property_changed(GDBusProxy *proxy, const char *name,
 
 			DBG("pretty hostname: %s", str);
 
+			if (g_str_equal(str, "") == TRUE) {
+				g_free(pretty_hostname);
+				pretty_hostname = NULL;
+				return;
+			}
+
 			g_free(pretty_hostname);
 			pretty_hostname = g_strdup(str);