Jump to content

BSScaleformTranslator - correct way to retrieve?


Recommended Posts

Posted (edited)

Simple question - I believe I may have my code (in the Random Sex mod) incorrect. From version 2:

 

	const GFxLoader* const loader = GFxLoader::GetSingleton();
	GFxStateBag* const stateBag = (loader == nullptr) ? nullptr : loader->stateBag;
	const BSScaleformTranslator* const translator = (stateBag == nullptr) ? nullptr : stateBag->GetTranslator();

	if (translator == nullptr) {
		_WARNING(ERROR_TRANSLATOR_LOAD);
		return "";
	}

 

Is there a more correct way of doing this? I believe the code above may be responsible for CTDs when generating notifications.

 

Edit: Didn't realize there was a separate tech support section for SE, but I suspect the code is similar for both (the above is for AE).

Edited by Arizona_Steve

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...