From a92e08639adc3ae255f67a8834f07e5f8777c066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Thu, 17 Nov 2016 17:39:01 +0100 Subject: [PATCH] Guarded the Link View command from beeing enabled when no view linker is active --- ApplicationCode/Commands/ViewLink/RicLinkViewFeature.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ApplicationCode/Commands/ViewLink/RicLinkViewFeature.cpp b/ApplicationCode/Commands/ViewLink/RicLinkViewFeature.cpp index 0157de7d48..bd866b10a8 100644 --- a/ApplicationCode/Commands/ViewLink/RicLinkViewFeature.cpp +++ b/ApplicationCode/Commands/ViewLink/RicLinkViewFeature.cpp @@ -42,6 +42,11 @@ bool RicLinkViewFeature::isCommandEnabled() RimView* activeView = RiaApplication::instance()->activeReservoirView(); if (!activeView) return false; + RimProject* proj = RiaApplication::instance()->project(); + RimViewLinker* viewLinker = proj->viewLinkerCollection->viewLinker(); + + if(!viewLinker) return false; + RimViewController* viewController = activeView->viewController(); if(viewController)