From aeb76139f7c204bac6d52bb9acec611b888b687a Mon Sep 17 00:00:00 2001 From: Thomas Amland Date: Tue, 24 Feb 2015 15:26:39 +0100 Subject: [PATCH] [addons] make sure to get correct extension point before attempting to cast to plugin fixes crash when plugin isn't the first extension point --- xbmc/view/GUIViewState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/view/GUIViewState.cpp b/xbmc/view/GUIViewState.cpp index 63692d34150cf..edc2f9205ca81 100644 --- a/xbmc/view/GUIViewState.cpp +++ b/xbmc/view/GUIViewState.cpp @@ -560,7 +560,7 @@ CGUIViewStateFromItems::CGUIViewStateFromItems(const CFileItemList &items) : CGU { CURL url(items.GetPath()); AddonPtr addon; - if (CAddonMgr::Get().GetAddon(url.GetHostName(),addon) && addon) + if (CAddonMgr::Get().GetAddon(url.GetHostName(), addon, ADDON_PLUGIN)) { PluginPtr plugin = std::static_pointer_cast(addon); if (plugin->Provides(CPluginSource::AUDIO))