Kaydet (Commit) f62e9f40 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

prevent that deadlock by only rpotecting shared resources

Again update may not be protected bt the mutex.

Change-Id: I8b9862c8ecafad75eea3b9e041d3063532f7bf63
üst 2480abb1
...@@ -687,11 +687,14 @@ void GL3DBarChart::moveToCorner() ...@@ -687,11 +687,14 @@ void GL3DBarChart::moveToCorner()
void GL3DBarChart::scroll(long nDelta) void GL3DBarChart::scroll(long nDelta)
{ {
osl::MutexGuard aGuard(maMutex); {
osl::MutexGuard aGuard(maMutex);
glm::vec3 maDir = glm::normalize(maCameraPosition - maCameraDirection);
maCameraPosition -= (float((nDelta/10)) * maDir);
mpCamera->setPosition(maCameraPosition);
}
glm::vec3 maDir = glm::normalize(maCameraPosition - maCameraDirection);
maCameraPosition -= (float((nDelta/10)) * maDir);
mpCamera->setPosition(maCameraPosition);
update(); update();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment