From ccfb13313b572f2389a36b4f1a38aebea9a96e95 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Mon, 18 Dec 2023 08:11:39 +0100 Subject: [PATCH] tile.lua: talk.track.color might not exist --- tile.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tile.lua b/tile.lua index 281da70..4c941ca 100644 --- a/tile.lua +++ b/tile.lua @@ -315,13 +315,15 @@ local function view_all_talks(starts, ends, config, x1, y1, x2, y2) local time_width = font_running:width(talk_time, time_size) text(font_text, col2 - 35 - time_width, y, talk_time, time_size, rgba(default_color, 1)) - if show_track and talk.track and talk.track.color then - local r,g,b = helper.parse_rgb(talk.track.color) - a.add(anims.moving_image_raw( - S, E, resource.create_colored_texture(r,g,b,1), - col2 - 25, y, - col2 - 10, y + #title_lines*title_size + 3 + #info_lines*info_size - )) + if show_track and talk.track then + if talk.track.color then + local r,g,b = helper.parse_rgb(talk.track.color) + a.add(anims.moving_image_raw( + S, E, resource.create_colored_texture(r,g,b,1), + col2 - 25, y, + col2 - 10, y + #title_lines*title_size + 3 + #info_lines*info_size + )) + end end -- title