UI: Fix incorrect 3D API.

If the string doesn't exist (e.g. OpenGL ES), the std::string goes out of
scope, and we end up with a bad string.  Oops.
This commit is contained in:
Unknown W. Brackets 2018-11-10 07:47:50 -08:00
parent c96748f0e2
commit ca8681f59c

View file

@ -388,7 +388,8 @@ void SystemInfoScreen::CreateViews() {
DrawContext *draw = screenManager()->getDrawContext();
const char *apiName = gr->T(screenManager()->getDrawContext()->GetInfoString(InfoField::APINAME));
const std::string apiNameKey = draw->GetInfoString(InfoField::APINAME);
const char *apiName = gr->T(apiNameKey);
deviceSpecs->Add(new InfoItem(si->T("3D API"), apiName));
deviceSpecs->Add(new InfoItem(si->T("Vendor"), draw->GetInfoString(InfoField::VENDORSTRING)));
std::string vendor = draw->GetInfoString(InfoField::VENDOR);