Fix crash when rendering linkgraph overlay in smallmap window

See: #633
This commit is contained in:
Jonathan G Rennison
2024-01-23 00:06:35 +00:00
parent e86d52bcaf
commit 5bd4e96347

View File

@@ -457,7 +457,7 @@ void LinkGraphOverlay::PrepareDraw()
if (this->dirty) {
this->RebuildCache();
}
if (this->last_update_number != GetWindowUpdateNumber() && this->window->viewport->zoom < ZOOM_LVL_DRAW_MAP) {
if (this->last_update_number != GetWindowUpdateNumber() && (this->window->viewport == nullptr || this->window->viewport->zoom < ZOOM_LVL_DRAW_MAP)) {
this->last_update_number = GetWindowUpdateNumber();
this->RefreshDrawCache();
}