Skip to content

Commit

Permalink
[fix] closes xbmc#13533. This eliminates a control lookup that result…
Browse files Browse the repository at this point in the history
…s in an exception when the particular control isn't a known python control type.
  • Loading branch information
Jim Carroll committed Nov 11, 2012
1 parent 33c04d0 commit 39af2a1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions xbmc/interfaces/legacy/WindowXML.cpp
Expand Up @@ -377,12 +377,8 @@ namespace XBMCAddon
{
if ((controlClicked->IsContainer() && (message.GetParam1() == ACTION_SELECT_ITEM || message.GetParam1() == ACTION_MOUSE_LEFT_CLICK)) || !controlClicked->IsContainer())
{
AddonClass::Ref<Control> inf(GetControlById(iControl));
if (inf.isNotNull())
{
invokeCallback(new CallbackFunction<WindowXML,int>(this,&WindowXML::onClick,iControl));
PulseActionEvent();
}
invokeCallback(new CallbackFunction<WindowXML,int>(this,&WindowXML::onClick,iControl));
PulseActionEvent();
return true;
}
else if (controlClicked->IsContainer() && message.GetParam1() == ACTION_MOUSE_RIGHT_CLICK)
Expand Down

0 comments on commit 39af2a1

Please sign in to comment.