Fix #8275

Please check: http://hub.qgis.org/issues/8275