dfk41 It was an episode of red Dwarf called “Marooned”
To keep warm during their stories, Lister burns Rimmer’s collection of books and a sizeable amount of money he saved up in life. When the fire burns low, Lister suggests using either Rimmer’s collection of 19th century war figures or his camphor wood chest, to which Rimmer refuses to let them be used and recommends that Lister’s guitar be burned instead. Lister reluctantly agrees and asks for a moment alone, whereupon he secretly cuts out a silhouette of his guitar from the trunk, burns it, and hides his guitar in a locker. When Rimmer returns, he commends Lister for his assumed sacrifice, noting how much their personal belongings each mean to them. Shortly afterwards, Kryten and Cat arrive, having searched for the pair for the past two days, revealing that Holly mistook grit on the ship’s scanner-scope for black holes. As the group prepare to leave, Rimmer discovers Lister’s deceit when he recovers his guitar, and advises Kryten to grab a hacksaw as he prepares to make him a eunuch
As you might guess, I have watched every episode of Red Dwarf, many many times and they still make me laugh.