[gnome-boxes] Xml.Parse may return null if URI is invalid
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Xml.Parse may return null if URI is invalid
- Date: Fri, 18 Nov 2011 14:24:11 +0000 (UTC)
commit 34ae8f90b00ac416b404b2e4982c4cc92858ba93
Author: Stefano Facchini <stefano facchini gmail com>
Date: Fri Nov 18 15:23:37 2011 +0100
Xml.Parse may return null if URI is invalid
src/wizard.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/wizard.vala b/src/wizard.vala
index 7feb42d..4b5c63e 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -175,7 +175,7 @@ private class Boxes.Wizard: Boxes.UI {
private void prepare_for_uri (string uri_as_text) throws Boxes.Error {
var uri = Xml.URI.parse (uri_as_text);
- if (uri.server == null)
+ if (uri == null || uri.server == null)
throw new Boxes.Error.INVALID ("the URI is invalid");
source = new CollectionSource (uri.server, uri.scheme, uri_as_text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]