[gitg] Check libgit2 has been built with threading support



commit 0da037c7468dac89f4c69082e06bf6780a81df56
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Mar 25 08:26:53 2013 +0100

    Check libgit2 has been built with threading support

 libgitg/gitg-init.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libgitg/gitg-init.vala b/libgitg/gitg-init.vala
index b4043f4..06c4ddb 100644
--- a/libgitg/gitg-init.vala
+++ b/libgitg/gitg-init.vala
@@ -22,6 +22,11 @@ namespace Gitg
 
 public void init()
 {
+       if ((Ggit.get_capabilities() & Ggit.CapFlags.THREADS) == 0)
+       {
+               error("libgit2 must be build with thread support in order to run gitg");
+       }
+
        Ggit.init();
 
        var factory = Ggit.ObjectFactory.get_default();


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