From 9811fc860e0c0349d0d2900135986bcf7101d0dc Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Wed, 26 Sep 2018 14:53:50 -0700 Subject: [PATCH] Fixed crash when gamepads are enabled. Fixes #268. --- common/lc_mainwindow.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lc_mainwindow.h b/common/lc_mainwindow.h index 2bb5eefb..6ffe9adf 100644 --- a/common/lc_mainwindow.h +++ b/common/lc_mainwindow.h @@ -188,7 +188,7 @@ public: View* GetActiveView() const { - lcModelTabWidget* CurrentTab = (lcModelTabWidget*)mModelTabWidget->currentWidget(); + lcModelTabWidget* CurrentTab = mModelTabWidget ? (lcModelTabWidget*)mModelTabWidget->currentWidget() : nullptr; return CurrentTab ? CurrentTab->GetActiveView() : nullptr; }