fix: nil-guard in _invoke_context_menu + README English

- _invoke_context_menu now early-returns if locale_factory()
  returns nil mid-frame, symmetric with build_rows. Prevents the
  race where a workbench destroyed between render and right-click
  would propagate nil locale into ctx_inner and crash craft.
- README v0.2.0 sections (M.create + action-callback) translated
  from Denglisch to English for consistency with the rest of the
  file.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Calic
2026-06-14 19:53:00 +02:00
parent 31e51ee8b7
commit c725ffd3bc
2 changed files with 16 additions and 16 deletions

View File

@@ -296,6 +296,7 @@ end
function M._invoke_context_menu(widget, recipe_id, mx, my)
local locale = widget._locale_factory()
if locale == nil then return end -- symmetric with build_rows
local sink_alias
if type(locale) == "table" then
sink_alias = locale.sink