Don't crash when doing the software rendering case, which will have stch as a NULL pointer. Instead, just go straight to the software rendering else case.