\r
if( cl_geckoembedding == NULL ) {\r
char profile_path [MAX_OSPATH];\r
+ OSGK_GeckoResult grc;\r
\r
OSGK_EmbeddingOptions *options = osgk_embedding_options_create();\r
osgk_embedding_options_add_search_path( options, "./xulrunner/" );\r
dpsnprintf (profile_path, sizeof (profile_path), "%s/xulrunner_profile/", fs_gamedir);\r
osgk_embedding_options_set_profile_dir( options, profile_path, 0 );\r
- cl_geckoembedding = osgk_embedding_create_with_options( options, NULL );\r
+ cl_geckoembedding = osgk_embedding_create_with_options( options, &grc );\r
osgk_release( options );\r
\r
if( cl_geckoembedding == NULL ) {\r
- Con_Printf( "CL_Gecko_CreateBrowser: Couldn't retrieve gecko embedding object!\n" );\r
+ Con_Printf( "CL_Gecko_CreateBrowser: Couldn't retrieve gecko embedding object (%.8x)!\n", grc );\r
return NULL;\r
}\r
}\r
instance->active = true;\r
strlcpy( instance->name, name, sizeof( instance->name ) );\r
instance->browser = osgk_browser_create( cl_geckoembedding, DEFAULT_GECKO_SIZE, DEFAULT_GECKO_SIZE );\r
+ if( instance->browser == NULL ) {\r
+ Con_Printf( "CL_Gecko_CreateBrowser: Browser object creation failed!\n" );\r
+ }\r
// TODO: assert != NULL\r
\r
instance->width = instance->texWidth = DEFAULT_GECKO_SIZE;\r
}\r
\r
void CL_Gecko_NavigateToURI( clgecko_t *instance, const char *URI ) {\r
- if( instance && instance->active ) {\r
+ if( !instance || !instance->browser ) {\r
+ return;\r
+ }\r
+\r
+ if( instance->active ) {\r
osgk_browser_navigate( instance->browser, URI );\r
}\r
}\r