Get the GSBackend class in a safer way

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14783 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2002-10-15 00:47:52 +00:00
parent a92e6cdeec
commit 1b95651245

View file

@ -203,8 +203,9 @@ initialize_gnustep_backend(void)
_(@"Can't load object file from backend at path %@"),
path);
/* Now extract the GSBackend class from the loaded bundle. */
backend = [theBundle classNamed: @"GSBackend"];
/* Now get the GSBackend class, which should have just been loaded
* from the bundle. */
backend = NSClassFromString (@"GSBackend");
NSCAssert1 (backend != Nil,
_(@"Backend at path %@ doesn't contain the GSBackend class"),
path);