| Index: native_client_sdk/src/libraries/ppapi_simple/ps.cc
|
| diff --git a/native_client_sdk/src/libraries/ppapi_simple/ps.cc b/native_client_sdk/src/libraries/ppapi_simple/ps.cc
|
| index 540488f11d9d5b7979960192d5255e6bc8ebcec8..2ba183ea799486174ebb0df8611a3ea911a3e6a4 100644
|
| --- a/native_client_sdk/src/libraries/ppapi_simple/ps.cc
|
| +++ b/native_client_sdk/src/libraries/ppapi_simple/ps.cc
|
| @@ -12,12 +12,17 @@
|
|
|
| static pp::Instance* s_Instance = NULL;
|
|
|
| -PP_Instance PSGetInstanceId() {
|
| +PP_Instance PSGetInstanceId(void) {
|
| + if (s_Instance == NULL)
|
| + return 0;
|
| return s_Instance->pp_instance();
|
| }
|
|
|
| const void* PSGetInterface(const char *name) {
|
| - return pp::Module::Get()->GetBrowserInterface(name);
|
| + pp::Module* module = pp::Module::Get();
|
| + if (module == NULL)
|
| + return NULL;
|
| + return module->GetBrowserInterface(name);
|
| }
|
|
|
|
|
|
|