Skip to content
Snippets Groups Projects
Commit 0faede02 authored by DarkGod's avatar DarkGod
Browse files

Fixed chat error when some weird URLs are pasted

parent 2b338d70
No related branches found
No related tags found
No related merge requests found
......@@ -69,10 +69,10 @@ function _M:createTextures()
end
function _M:enableFBORenderer(texture, shader)
if not shader then
if not shader or not core.display.fboSupportsTransparency() then
self.fbo = nil
return
self:createTextures()
return
end
self.fbo = core.display.newFBO(Map.viewport.width, Map.viewport.height)
if not self.fbo then
......
......@@ -121,7 +121,7 @@ function _M:addMessage(kind, channel, login, name, msg, extra_data, no_change)
local url = urlmatch:match(msg)
if url then
msg = msg:lpegSub(urlfind, "#LIGHT_BLUE##{italic}#"..url.."#{normal}##LAST#")
pcall(function() msg = msg:lpegSub(urlfind, "#LIGHT_BLUE##{italic}#"..url.."#{normal}##LAST#") end)
end
local item = {channel=channel, kind=kind, login=login, name=name, color_name=color_name, msg=msg, url=url, extra_data=extra_data, timestamp=core.game.getTime()}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment