Fixes `null` cursor passed to grid adapter.