From 85a820918fb6f739a988703ec450b9d6614a5169 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sun, 13 Sep 2015 18:49:46 +0200 Subject: [PATCH] Fix a crash when opening a new file when the grid is not scrolled to the top --- src/base_grid.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base_grid.cpp b/src/base_grid.cpp index 25f9f6197..151b15be0 100644 --- a/src/base_grid.cpp +++ b/src/base_grid.cpp @@ -571,6 +571,7 @@ void BaseGrid::AdjustScrollbar() { scrollBar->SetSize(clientSize.GetWidth() - scrollbarSize.GetWidth(), 0, scrollbarSize.GetWidth(), clientSize.GetHeight()); if (GetRows() <= 1) { + yPos = 0; scrollBar->Enable(false); scrollBar->Thaw(); return;