Skip to content

Commit

Permalink
fixed: don't assing std::string to nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
notspiff authored and popcornmix committed Sep 20, 2015
1 parent e319339 commit 6cb892e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xbmc/windowing/X11/WinSystemX11GLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,12 @@ bool CWinSystemX11GLContext::RefreshGLContext(bool force)
if (ret && !firstrun)
return ret;

std::string gpuvendor = "";
std::string gpuvendor;
if (ret)
{
gpuvendor = (const char*) glGetString(GL_VENDOR);
const char* vend = (const char*) glGetString(GL_VENDOR);
if (vend)
gpuvendor = vend;
}
std::transform(gpuvendor.begin(), gpuvendor.end(), gpuvendor.begin(), ::tolower);
if (firstrun && (!ret || gpuvendor.compare(0, 5, "intel") != 0))
Expand Down

0 comments on commit 6cb892e

Please sign in to comment.