Move the "if (!gTriedToLoadLibGnomeUI)" code to its own static helper function, say "EnsureLibGnomeLoaded()". Put all the PR_FindFunctionSymbol calls together and then just have one "if (!_gnome_init || !_gnome_icon_theme_new || ...)" statement.
+ if (gLibGnomeUI) { + PR_UnloadLibrary(gLibGnomeUI); + gLibGnomeUI = nsnull; + }
Also set gTriedToLoadLibGnomeUI to false so we can start up again if we need to.
Otherwise looks just right!
Move the "if (!gTriedToLoadL ibGnomeUI) " code to its own static helper function, say "EnsureLibGnome Loaded( )". Put all the PR_FindFunction Symbol calls together and then just have one "if (!_gnome_init || !_gnome_ icon_theme_ new || ...)" statement.
+ if (gLibGnomeUI) { y(gLibGnomeUI) ;
+ PR_UnloadLibrar
+ gLibGnomeUI = nsnull;
+ }
Also set gTriedToLoadLib GnomeUI to false so we can start up again if we need to.
Otherwise looks just right!