Code

wreadln: return NULL instead of empty string
[ncmpc.git] / src / wreadln.c
index df5b55e8c97a9d7ae2477a8363de70fdaab9f1f6..a382fcecc2d7cbc1ddb4410fcd56c52c936b4134 100644 (file)
@@ -603,6 +603,9 @@ _wreadln(WINDOW *w,
                }
        }
 
+       if (wr.line[0] == 0)
+               return NULL;
+
        return g_strdup(wr.line);
 }