diff options
author | Marco Pesenti Gritti <marcopg@litl.com> | 2009-03-16 16:45:24 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marcopg@litl.com> | 2010-07-27 22:04:21 (GMT) |
commit | 4a2b6946c2aa722efafa3152c5f53579a5396b1e (patch) | |
tree | 730d5cc975cde92902f6a5a98f1a21a6f7b022fb /browser-plugin/glue.cpp | |
parent | b9e24e6165e2a49d0012a604bffbf166c6afc0f3 (diff) |
Fix evince initialization. Use HIBYTE macro.
Diffstat (limited to 'browser-plugin/glue.cpp')
-rw-r--r-- | browser-plugin/glue.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/browser-plugin/glue.cpp b/browser-plugin/glue.cpp index 18713d7..ebce5f7 100644 --- a/browser-plugin/glue.cpp +++ b/browser-plugin/glue.cpp @@ -39,7 +39,9 @@ static char *mimeDescription = NULL; char * NP_GetMIMEDescription (void) { - ev_init (); + if (!ev_is_initialized()) { + ev_init (); + } if (mimeDescription == NULL) { GString *desc = g_string_new (NULL); @@ -77,13 +79,15 @@ NP_Initialize (NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *aNPPFuncs) g_module_close (module); #endif - ev_init (); + if (!ev_is_initialized()) { + ev_init (); + } if (aNPNFuncs == NULL || aNPPFuncs == NULL) { return NPERR_INVALID_FUNCTABLE_ERROR; } - if ((aNPNFuncs->version >> 8) > NP_VERSION_MAJOR) { + if (HIBYTE(aNPNFuncs->version) > NP_VERSION_MAJOR) { return NPERR_INCOMPATIBLE_VERSION_ERROR; } |