[ostree] checkout: Fix previous commit



commit 6a01ec10326134c7149562b228c34c9abb67ecd7
Author: Colin Walters <walters verbum org>
Date:   Wed Sep 11 11:54:53 2013 -0400

    checkout: Fix previous commit
    
    Don't try to close in cases where we don't have input.

 src/libostree/ostree-repo-checkout.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c
index 437e309..13add04 100644
--- a/src/libostree/ostree-repo-checkout.c
+++ b/src/libostree/ostree-repo-checkout.c
@@ -503,8 +503,11 @@ checkout_one_file_at (OstreeRepo                        *repo,
             }
         }
 
-      if (!g_input_stream_close (input, cancellable, error))
-        goto out;
+      if (input)
+        {
+          if (!g_input_stream_close (input, cancellable, error))
+            goto out;
+        }
     }
 
   ret = TRUE;


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