The crash happens because the draw code attempts to perform GPU subdivision
edit mode is entered when switching to the UV editing tab although
the subsurf modifier is not the last in the stack. As edit mode is entered,
the draw code looks up the last modifier by using the edit mode flag
(eModifierMode_Editmode), however it could be that the last actual enabled
modifier is not enabled in edit mode, so the subsurf modifier should not be
selected.
This adds a check for the eModifierMode_Editmode flag when looking up the
last enabled modifier for GPU subdivision, and only return true if the last
modifier is the same with and without the flag.