Pārlūkot izejas kodu

default to :0.0, don't crash on exit

David Rose 22 gadi atpakaļ
vecāks
revīzija
48371c589d
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      panda/src/glxdisplay/glxGraphicsPipe.cxx

+ 4 - 0
panda/src/glxdisplay/glxGraphicsPipe.cxx

@@ -44,6 +44,9 @@ glxGraphicsPipe(const string &display) {
   if (display_spec.empty()) {
   if (display_spec.empty()) {
     display_spec = ExecutionEnvironment::get_environment_variable("DISPLAY");
     display_spec = ExecutionEnvironment::get_environment_variable("DISPLAY");
   }
   }
+  if (display_spec.empty()) {
+    display_spec = ":0.0";
+  }
 
 
   setlocale(LC_ALL, "");
   setlocale(LC_ALL, "");
 
 
@@ -52,6 +55,7 @@ glxGraphicsPipe(const string &display) {
   _display = NULL;
   _display = NULL;
   _screen = 0;
   _screen = 0;
   _root = (Window)NULL;
   _root = (Window)NULL;
+  _im = (XIM)NULL;
 
 
   install_error_handlers();
   install_error_handlers();