glx: Put null check before use