Don't call XCloseDisplay with a NULL Display*

* Normally we'd always have a Display*, but if we're running without an
  X server present, the Display* will be NULL.
This commit is contained in:
baldurk
2017-09-26 13:29:56 +01:00
parent e9171e4d82
commit c05bdc2032
+2 -1
View File
@@ -452,7 +452,8 @@ int main(int argc, char *argv[])
int ret = renderdoccmd(env, argc, argv);
XCloseDisplay(display);
if(display)
XCloseDisplay(display);
return ret;
}