Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
avoid std::string creation from null (#58)
Browse files Browse the repository at this point in the history
* avoid string assignment from null pointer

* bump to v0.3.10
  • Loading branch information
headupinclouds authored Apr 10, 2019
1 parent 9cf1352 commit ada7029
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ HunterGate(
LOCAL
)

project(ogles_gpgpu VERSION 0.3.9)
project(ogles_gpgpu VERSION 0.3.10)

# !!! Make sure option OGLES_GPGPU_OPENG_ES3 occurs prior to the first
# hunter_add_package() call. This will allow us to modify settings
Expand Down
6 changes: 5 additions & 1 deletion ogles_gpgpu/common/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ void Core::getOutputData(unsigned char* buf) {
void Core::checkGLExtensions() {

// get string with extensions seperated by a SPACE
std::string glExtString = reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS));
std::string glExtString;
const auto * extensions = reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS));
if(extensions != nullptr) {
glExtString = extensions;
}

// get extensions as vector
vector<string> glExt = Tools::split(glExtString);
Expand Down

0 comments on commit ada7029

Please sign in to comment.