Skip to content

Commit

Permalink
Add null pointer check before dereferrence.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Feb 2, 2012
1 parent 1bd95e6 commit 4167a42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mythtv/libs/libmythui/AppleRemote.cpp
Expand Up @@ -357,7 +357,8 @@ bool AppleRemote::_createDeviceInterface(io_object_t hidDevice)
kIOCFPlugInInterfaceID,
&plugInInterface, &score);

if (ioReturnValue == kIOReturnSuccess)
if ((kIOReturnSuccess == ioReturnValue) &&
plugInInterface && *plugInInterface)
{
HRESULT plugInResult = (*plugInInterface)->QueryInterface
(plugInInterface,
Expand Down

0 comments on commit 4167a42

Please sign in to comment.