From: Marten Richter Date: Sat, 3 Nov 2012 07:22:05 +0000 (+0100) Subject: Fix segfault in boxstack.cc X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=220a1cf437901c3f73c9597fa9255ffa45868055;p=vompclient-marten.git Fix segfault in boxstack.cc --- diff --git a/boxstack.cc b/boxstack.cc index beb8280..5330003 100644 --- a/boxstack.cc +++ b/boxstack.cc @@ -281,6 +281,16 @@ void BoxStack::update(Boxx* toUpdate, Region* regionToUpdate) toUpdate = boxes[0]; } + if (!toUpdate) { +#ifndef WIN32 + pthread_mutex_unlock(&boxLock); +#else + ReleaseMutex(boxLock); +#endif + Log::getInstance()->log("BoxStack", Log::DEBUG, "Unlocked for update, no box present"); + return ; + } + // get the region for the whole box, could be less than that // for smaller updates