tags:

views:

47

answers:

0

Hi,

I am trying to make the sample plugin scriptable. I observed browser crash at the statement 
 *v = obj;

in the below code.

NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)

{ if (variable == NPPVpluginScriptableNPObject) { void *v = (void *)value; PluginObject obj = (PluginObject) instance->pdata; if (obj) browser->retainobject((NPObject*)obj); *v = obj; //Crash observed } }

This is the crucial point where it is assigning the object of the NPClass back to the browser.

Please let me know how to resolve this issue so that browser can make further calls.