[vala/switch-to-gir] girparser: Fix Metadata.empty static initialization



commit b3f1780db27099da427b37041b5260731ab533a3
Author: Luca Bruno <lethalman88 gmail com>
Date:   Sat Aug 28 13:18:26 2010 +0200

    girparser: Fix Metadata.empty static initialization

 vala/valagirparser.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 95e6b0a..b0f39cb 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -89,9 +89,12 @@ public class Vala.GirParser : CodeVisitor {
 	}
 
 	class Metadata {
-		private static Metadata _empty = new Metadata ("");
+		private static Metadata _empty = null;
 		public static Metadata empty {
 			get {
+				if (_empty == null) {
+					_empty = new Metadata ("");
+				}
 				return _empty;
 			}
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]