aboutsummaryrefslogtreecommitdiff
path: root/src/lua_interface.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-06-18 18:24:00 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2008-06-18 18:24:00 -0400
commit780482b1658f3b70d65f0e8f511aae8cd1cd5d1c (patch)
treebe8d3e6b6316271e03cab9b43a927061e2326676 /src/lua_interface.c
parent438106e7b4594987feb351de9f76f94ed9bf5d73 (diff)
downloadtextadept-780482b1658f3b70d65f0e8f511aae8cd1cd5d1c.tar.gz
textadept-780482b1658f3b70d65f0e8f511aae8cd1cd5d1c.zip
Check that 'pixbuf' key is not nil in l_pm_populate; src/lua_interface.c
Diffstat (limited to 'src/lua_interface.c')
-rw-r--r--src/lua_interface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c
index 20a28a6e..8706d4e1 100644
--- a/src/lua_interface.c
+++ b/src/lua_interface.c
@@ -788,7 +788,8 @@ void l_pm_populate(GtkTreeIter *initial_iter) {
lua_getfield(lua, -1, "pixbuf");
if (lua_isstring(lua, -1))
gtk_tree_store_set(pm_store, &iter, 0, lua_tostring(lua, -1), -1);
- else warn("pm.populate: pixbuf key must have string value.");
+ else if (!lua_isnil(lua, -1))
+ warn("pm.populate: pixbuf key must have string value.");
lua_pop(lua, 1); // pixbuf
lua_getfield(lua, -1, "text");
gtk_tree_store_set(pm_store, &iter, 2, lua_isstring(lua, -1) ?