Widget switching crashes editor

It crashes on line 59 of MyPawn.cpp. It is on line 245 of the log file.