From df1d2faca552eb49d88b65ece3ff1d68393d30cb Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Tue, 19 May 2020 15:18:25 +0100
Subject: [PATCH] runtime: Don't critical if we were unable to lock the runtime

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 src/runtime.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/runtime.c b/src/runtime.c
index 6bb8d86e2..180358dfa 100644
--- a/src/runtime.c
+++ b/src/runtime.c
@@ -297,7 +297,9 @@ pv_runtime_finalize (GObject *object)
   g_free (self->runtime_usr);
   g_free (self->source_files);
   g_free (self->tools_dir);
-  pv_bwrap_lock_free (self->runtime_lock);
+
+  if (self->runtime_lock != NULL)
+    pv_bwrap_lock_free (self->runtime_lock);
 
   G_OBJECT_CLASS (pv_runtime_parent_class)->finalize (object);
 }
-- 
GitLab