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

[libvirt] [libvirt-java] [PATCH 13/15] Call processError only when virInitialize signalled an error



---
 src/main/java/org/libvirt/Library.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/libvirt/Library.java b/src/main/java/org/libvirt/Library.java
index 33d3042..95c13cb 100644
--- a/src/main/java/org/libvirt/Library.java
+++ b/src/main/java/org/libvirt/Library.java
@@ -1,6 +1,7 @@
 package org.libvirt;
 
 import org.libvirt.jna.Libvirt;
+import static org.libvirt.ErrorHandler.processError;
 
 import com.sun.jna.Native;
 import com.sun.jna.Pointer;
@@ -24,10 +25,9 @@ final class Library {
 
     // Load the native part
     static {
-        Libvirt.INSTANCE.virInitialize();
         libvirt = Libvirt.INSTANCE;
         try {
-            ErrorHandler.processError(Libvirt.INSTANCE);
+            processError(libvirt.virInitialize());
         } catch (Exception e) {
             e.printStackTrace();
         }
-- 
1.8.5.2.msysgit.0


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