Commit 745dbe97 authored by JP Dinger's avatar JP Dinger

mozilla plugin: cosmetics.

parent 8114a97f
...@@ -799,27 +799,20 @@ LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args, ...@@ -799,27 +799,20 @@ LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args,
{ {
if( (argCount < 1) || (argCount > 3) ) if( (argCount < 1) || (argCount > 3) )
return INVOKERESULT_NO_SUCH_METHOD; return INVOKERESULT_NO_SUCH_METHOD;
if( !NPVARIANT_IS_STRING(args[0]) )
char *url = NULL; return INVOKERESULT_NO_SUCH_METHOD;
// grab URL // grab URL
if( NPVARIANT_IS_STRING(args[0]) ) char *s = stringValue(NPVARIANT_TO_STRING(args[0]));
{ if( !s )
char *s = stringValue(NPVARIANT_TO_STRING(args[0])); return INVOKERESULT_OUT_OF_MEMORY;
if( s )
{ char *url = p_plugin->getAbsoluteURL(s);
url = p_plugin->getAbsoluteURL(s); if( url )
if( url ) free(s);
free(s);
else
// problem with combining url, use argument
url = s;
}
else
return INVOKERESULT_OUT_OF_MEMORY;
}
else else
return INVOKERESULT_NO_SUCH_METHOD; // problem with combining url, use argument
url = s;
char *name = NULL; char *name = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment