Skip to content

Commit b3bb1a9

Browse files
authored
Merge pull request #285 from tne-lab/lfp-viewer-drawer-fix
Fix crash when opening LFP Viewer drawer
2 parents 3be5da1 + 0e1269e commit b3bb1a9

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Source/Plugins/LfpDisplayNode/LfpDisplayCanvas.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,8 +2449,12 @@ void LfpDisplay::paint(Graphics& g)
24492449

24502450
void LfpDisplay::refresh()
24512451
{
2452-
if (true)
2453-
{
2452+
// Ensure the lfpChannelBitmap has been initialized
2453+
if (lfpChannelBitmap.isNull())
2454+
{
2455+
resized();
2456+
}
2457+
24542458
// X-bounds of this update
24552459
int fillfrom = canvas->lastScreenBufferIndex[0];
24562460
int fillto = (canvas->screenBufferIndex[0]);
@@ -2523,8 +2527,6 @@ void LfpDisplay::refresh()
25232527
}
25242528

25252529
canvas->fullredraw = false;
2526-
}
2527-
25282530
}
25292531

25302532

0 commit comments

Comments
 (0)