Skip to content

Commit

Permalink
fix(client): edge-case errors on restart
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Jun 16, 2023
1 parent 16b955e commit 0535686
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions modules/bridge/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ function client.onLogout()

client.closeInventory()
Shops.wipeShops()
ClearInterval(client.interval)
ClearInterval(client.tick)

if client.interval then
ClearInterval(client.interval)
ClearInterval(client.tick)
end

Weapon.Disarm()
end

Expand Down
2 changes: 1 addition & 1 deletion modules/shops/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ local function wipeShops()
local shop = shops[i]

if shop.zoneId then
exports.qtarget:RemoveZone(shop.zoneId)
pcall(exports.qtarget.RemoveZone, nil, shop.zoneId)
end

if shop.remove then
Expand Down

0 comments on commit 0535686

Please sign in to comment.