viewport_info can be NULL. Check for this.

This commit is contained in:
Themaister 2013-10-26 18:51:00 +02:00
parent fc5ba8f79a
commit 9be4fe705b

View File

@ -1040,7 +1040,7 @@ void init_video_input(void)
driver.video->poke_interface(driver.video_data, &driver.video_poke);
// Force custom viewport to have sane parameters.
if (!custom_vp->width || !custom_vp->height)
if (driver.video->viewport_info && (!custom_vp->width || !custom_vp->height))
{
custom_vp->width = width;
custom_vp->height = height;