Где первая ошибка у тебя, попробуй замени:
if (pTextures->tMap[i]->raster)
ImGui::GetBackgroundDrawList()->AddImage(pTextures->tMap[i]->raster->RwD3D9Raster.texture, vecMapMin, vecMapMax, { 0, 0 }, { 1, 1 }, ImColor(255, 255, 255, 150));
на
if (pTextures->tMap[i]->raster) {...