File tree Expand file tree Collapse file tree
libraries/TiledDataViewer/src/main/java/org/micromanager/tileddataviewer/internal/gui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,6 +210,16 @@ public synchronized Image makeOrGetImage(DataViewCoords viewCoords) {
210210 TaggedImage imageForDisplay = getDisplayImage (axes , viewCoords .getResolutionIndex (),
211211 viewOffsetAtResX , viewOffsetAtResY , imagePixelWidth , imagePixelHeight );
212212
213+ // The requested resolution level / region may have no data yet - e.g. a zoom
214+ // that requests a pyramid level still being generated while tiles are acquired
215+ // concurrently. Skip this channel for now (keeping the last frame for it); the
216+ // next render fills it in once the data is ready. Without this guard the null
217+ // deref below throws, aborts the render, and leaves the canvas blank until the
218+ // zoom level changes.
219+ if (imageForDisplay == null ) {
220+ continue ;
221+ }
222+
213223 if (latestTags_ == null
214224 || (viewCoords .getAxesPositions ().containsKey (TiledDataViewer .CHANNEL_AXIS )
215225 && viewCoords .getAxesPositions ().get (TiledDataViewer .CHANNEL_AXIS )
You can’t perform that action at this time.
0 commit comments