check whether using external driver before calling flush_driver

This commit is contained in:
Vincent Wei
2020-03-22 12:48:04 +08:00
parent d4b226d2a5
commit 018340f42e

View File

@@ -2246,7 +2246,7 @@ static void DRM_UpdateRects (_THIS, int numrects, GAL_Rect *rects)
{
DrmVideoData* vdata = this->hidden;
if (vdata->driver_ops->flush_driver)
if (vdata->driver && vdata->driver_ops->flush_driver)
vdata->driver_ops->flush_driver(vdata->driver);
}