Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
Install authored and Install committed May 24, 2022
1 parent 4af452e commit 5d188ac
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions fluorender/FluoRender/VRenderView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2920,9 +2920,18 @@ void VRenderVulkanView::Segment()
else
{
VolumeData* vd = m_selector.GetVolume();
m_loader.SetMemoryLimitByte((long long)TextureRenderer::mainmem_buf_size_*1024LL*1024LL);
m_loader.PreloadLevel(vd, vd->GetMaskLv(), true);
m_selector.Select(m_brush_radius2-m_brush_radius1);
if (!vd && m_cur_vol)
{
m_selector.SetVolume(m_cur_vol);
vd = m_selector.GetVolume();
}

if (vd)
{
m_loader.SetMemoryLimitByte((long long)TextureRenderer::mainmem_buf_size_ * 1024LL * 1024LL);
m_loader.PreloadLevel(vd, vd->GetMaskLv(), true);
m_selector.Select(m_brush_radius2 - m_brush_radius1);
}
}

if (copied == true) RefreshGL(false, true);
Expand Down

0 comments on commit 5d188ac

Please sign in to comment.