Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit 79f311a

Browse files
authored
fix(menu): prevent opening empty menu (#675)
1 parent f895364 commit 79f311a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

resource/interface/client/menu.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ function lib.showMenu(id, startIndex)
4949
if not menu then
5050
error(('No menu with id %s was found'):format(id))
5151
end
52+
53+
if table.type(menu.options) == 'empty' then
54+
error(('Can\'t open empty menu with id %s'):format(id))
55+
end
56+
5257
if not openMenu then
5358
local control = cache.game == 'fivem' and 140 or 0xE30CD707
5459

0 commit comments

Comments
 (0)