FSSDawid/xbmc — comment on commit 2982626186b60c822a350033e55619058107350b
File: xbmc/interfaces/json-rpc/PVROperations.cpp line 117
By opdenkamp:

nope, you need to check for the return value of GetCurrentChannel().
this should be
'''C++
CPVRChannel currentChannel;
if (g_PVRManager.GetCurrentChannel(currentChannel))
{
// do stuff
}
'''

if you don't check the return value, you're just using the default values from CPVRChannel's constructor.

I also noticed that I'm not checking whether the manager is running in GetCurrentChannel(). I'll fix that.