Complete.Org: Mailing Lists: Archives: freeciv-dev: January 1999:
Re: [Freeciv-Dev] segfault on bad DISPLAY variable
Home

Re: [Freeciv-Dev] segfault on bad DISPLAY variable

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Per Mathisen <permath@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] segfault on bad DISPLAY variable
From: Nicolas BRUNEL <brunel@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Jan 1999 22:54:49 +0100 (CET)

On Fri, 15 Jan 1999, Per Mathisen wrote:

> CVS current segfaults in xmain.c when I try to run civclient but do not
> have my display variable set correctly (happens all the time). I don't
> remember it segfaulting for that reason before, and it is not exactly
> userfriendly behaviour.
> 
> It segfaults in the call to XtVaAppInitialize (in xmain.c). What is the
> most graceful way to detect and handle this?

Display *d;

if ((d = XOpenDisplay(getenv("DISPLAY"))) == NULL) {
        fprintf(stderr,"Can't open display\n");
        exit(1); }
        else XtVaAppInitialize ...

Concerning your second question, i have no answer.

Bye,



[Prev in Thread] Current Thread [Next in Thread]