[Spice-commits] gtk/controller
Marc-André Lureau
elmarco at kemper.freedesktop.org
Sun Jul 17 15:36:45 PDT 2011
gtk/controller/controller.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 0cb3dba038fda87b6a5062d1a5d1e3a4553bad1b
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Mon Jul 18 00:32:00 2011 +0200
gtk/controller: fail if SPICE_XPI_SOCKET is not provided
Instead of trying to connect to a '(null)' socket.
diff --git a/gtk/controller/controller.vala b/gtk/controller/controller.vala
index 760285f..d635984 100644
--- a/gtk/controller/controller.vala
+++ b/gtk/controller/controller.vala
@@ -225,7 +225,8 @@ public class Controller: Object {
#if WIN32
addr = (string*)"\\\\.\\pipe\\SpiceController-%lu".printf (GetCurrentProcessId ());
#else
- addr = (string*)"%s".printf (Environment.get_variable ("SPICE_XPI_SOCKET")); // FIXME vala...
+ if (Environment.get_variable ("SPICE_XPI_SOCKET") != null)
+ addr = (string*)"%s".printf (Environment.get_variable ("SPICE_XPI_SOCKET")); // FIXME vala...
#endif
if (addr == null)
throw new SpiceCtrl.Error.VALUE ("Missing SPICE_XPI_SOCKET");
More information about the Spice-commits
mailing list