]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Fix segfault in boxstack.cc
authorMarten Richter <marten.richter@freenet.de>
Sat, 3 Nov 2012 07:22:05 +0000 (08:22 +0100)
committerMarten Richter <marten.richter@freenet.de>
Sat, 3 Nov 2012 07:22:05 +0000 (08:22 +0100)
boxstack.cc

index beb828004bfb98f47a7e9521ea1ae216b6981560..5330003b1e8f307651bd492d29e6b695e63d723e 100644 (file)
@@ -281,6 +281,16 @@ void BoxStack::update(Boxx* toUpdate, Region* regionToUpdate)
     toUpdate = boxes[0];\r
   }\r
 \r
+  if (!toUpdate) {\r
+#ifndef WIN32\r
+         pthread_mutex_unlock(&boxLock);\r
+#else\r
+         ReleaseMutex(boxLock);\r
+#endif\r
+         Log::getInstance()->log("BoxStack", Log::DEBUG, "Unlocked for update, no box present");\r
+         return ;\r
+  }\r
+\r
   // get the region for the whole box, could be less than that\r
   // for smaller updates\r
 \r