This was wrong call to DeleteObject with nonGDI object, I fixed it.