mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtgreet: Do not crash if LANG is not set in the environment.
In that case, catopen() will have never been called, and we'd feed 0 as the first argument to catgets(). This crashes, at least on OpenBSD.
This commit is contained in:
parent
0e5560cee4
commit
76c874b068
1 changed files with 1 additions and 1 deletions
|
@ -791,7 +791,7 @@ unsigned char *
|
|||
ReadCatalog(int setn, int msgn, char *dflt)
|
||||
{
|
||||
OpenCatalog();
|
||||
if (0 > (int) nl_fd)
|
||||
if ((0 > (int) nl_fd) || (NULL == langenv))
|
||||
return (unsigned char*) dflt;
|
||||
else
|
||||
return (unsigned char*) catgets(nl_fd, setn, msgn, dflt);
|
||||
|
|
Loading…
Reference in a new issue