Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ changes (where available).
- Check added to ensure view has changed before processing GUI events
preventing hang on start.

- return an empty table (nil) for a non-existent tag accessed by index

- return an empty table (nil) when a tag contains no images with the tag

### Add action support for Lua

### Other Lua changes
Expand Down
6 changes: 3 additions & 3 deletions src/lua/tags.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ static int tag_index(lua_State *L)
int index = luaL_checkinteger(L, -1);
if(index < 1)
{
return luaL_error(L, "incorrect index in database");
lua_pushnil(L);
return 1;
}
sqlite3_stmt *stmt = NULL;
char query[1024];
Expand All @@ -107,8 +108,7 @@ static int tag_index(lua_State *L)
}
else
{
sqlite3_finalize(stmt);
luaL_error(L, "incorrect index in database");
lua_pushnil(L);
}
sqlite3_finalize(stmt);
return 1;
Expand Down
Loading