mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-01-11 16:51:47 +00:00
Guard against Item.view being None when dispatching
This commit is contained in:
@@ -1027,8 +1027,11 @@ class ViewStore:
|
||||
if item is None:
|
||||
return
|
||||
|
||||
# Note, at this point the View is *not* None
|
||||
task = item.view._dispatch_item(item, interaction) # type: ignore
|
||||
if item.view is None:
|
||||
_log.warning('View interaction referencing unknown view for item %s. Discarding', item)
|
||||
return
|
||||
|
||||
task = item.view._dispatch_item(item, interaction)
|
||||
if task is not None:
|
||||
self.add_task(task)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user