[libpeas] Don't use lgi_enter_func if not found
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Don't use lgi_enter_func if not found
- Date: Tue, 20 Jan 2015 09:24:02 +0000 (UTC)
commit c280b2e105ea7377a91166db45c19563ad40e5a8
Author: Garrett Regier <garrettregier gmail com>
Date: Mon Jan 5 11:09:17 2015 -0800
Don't use lgi_enter_func if not found
Prevents segfault when using an old LGI version.
loaders/lua5.1/peas-plugin-loader-lua.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/loaders/lua5.1/peas-plugin-loader-lua.c b/loaders/lua5.1/peas-plugin-loader-lua.c
index d5464d0..270a680 100644
--- a/loaders/lua5.1/peas-plugin-loader-lua.c
+++ b/loaders/lua5.1/peas-plugin-loader-lua.c
@@ -547,7 +547,8 @@ peas_plugin_loader_lua_finalize (GObject *object)
/* Must take the lock as Lua code will run on lua_close
* and another thread might be running Lua code already
*/
- priv->lgi_enter_func (priv->lgi_lock);
+ if (priv->lgi_enter_func != NULL)
+ priv->lgi_enter_func (priv->lgi_lock);
g_clear_pointer (&priv->L, (GDestroyNotify) lua_close);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]