Fix crash when invoking method without specifying interface
Previously this meant the interface variable is NULL, which led to an invalid string conversion from NULL to string, causing a crash. Check for NULL before doing the conversion.
This commit is contained in:
parent
f4b6182157
commit
63edf7777f
1 changed files with 6 additions and 1 deletions
|
@ -209,10 +209,15 @@ bool ObjectAdaptor::handle_message(const Message &msg)
|
|||
const CallMessage &cmsg = reinterpret_cast<const CallMessage &>(msg);
|
||||
const char *member = cmsg.member();
|
||||
const char *interface = cmsg.interface();
|
||||
InterfaceAdaptor *ii = NULL;
|
||||
|
||||
debug_log(" invoking method %s.%s", interface, member);
|
||||
|
||||
InterfaceAdaptor *ii = find_interface(interface);
|
||||
if (interface)
|
||||
ii = find_interface(interface);
|
||||
else
|
||||
ii = NULL;
|
||||
|
||||
if (ii)
|
||||
{
|
||||
try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue