Fixed crash when gamepads are enabled. Fixes #268.

This commit is contained in:
Leonardo Zide 2018-09-26 14:53:50 -07:00
parent 5dff72cf25
commit 9811fc860e

View file

@ -188,7 +188,7 @@ public:
View* GetActiveView() const View* GetActiveView() const
{ {
lcModelTabWidget* CurrentTab = (lcModelTabWidget*)mModelTabWidget->currentWidget(); lcModelTabWidget* CurrentTab = mModelTabWidget ? (lcModelTabWidget*)mModelTabWidget->currentWidget() : nullptr;
return CurrentTab ? CurrentTab->GetActiveView() : nullptr; return CurrentTab ? CurrentTab->GetActiveView() : nullptr;
} }