diff --git a/src/core/window-props.c b/src/core/window-props.c index 370c9c461..b7b3e12d1 100644 --- a/src/core/window-props.c +++ b/src/core/window-props.c @@ -427,7 +427,7 @@ set_title_text (MetaWindow *window, errno = 0; pwd = getpwuid (window_owner); - if (errno==0 || pwd==NULL) + if (errno==0 && pwd!=NULL) { found_name = pwd->pw_name; }