Galv's 'Use item on (empty)event' error

I'm currently using Galv's Use Item on event script. Can be found here: https://galvs-scripts.com/2012/12/07/use-item-on-event/

I found a bug that when the player uses an item on a 'switch condition trigger' event, the game will crash.
It's not just my game that causes this error because it's also appears in the official demo.
These photos will give a better demonstration about the bug.
Spoiler: Here:
1.png

2.png

3.png

4.png
Add this line right above the error line:
Code:
next unless event.list
This should fix it.
Add this line right above the error line:
Code:
next unless event.list
This should fix it.
Thank you it worked!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/galvs-use-item-on-empty-event-error.105875/