Nux

Code review comment for lp:~unity-team/nux/nux-fix-810182

Revision history for this message
Jay Taoko (jaytaoko) wrote :

> Hi Jay,
>
> I'd keep the display check first, that way you don't have to check it multiple
> times.
>
> Instead of the explicit checks, can we just use !?
>
> if (!display || !glx_supported) {
> if (!display)
> results.error = strdup ("unable to open display");
> ...

Will do.

> But the code looks sound.

The fix here is meant to do something that must be done before the program can continue. The program is using GLX without testing that it is available on the system. In this case, there is no need for a test. Or rather the "opposite test" is that the programs crashes when we do not check for GLX, as evidenced by the bug reports.

« Back to merge proposal