aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-06-12 13:29:23 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-06-12 13:29:23 +0900
commitc91103a9fd259730e0b2765646015ada184ac9c8 (patch)
tree9fdae29281d4e8635920bca238e0869c87d09b6f /src
parent35aa4b191be8c4fba6b3139d9028d45458fb4a7b (diff)
Bug fix: Refer removed surface id in vector of pending_end_draw
Change-Id: I76d86bb19388334dd640fbe07e8d307dec9b61cc Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src')
-rw-r--r--src/app.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/app.cpp b/src/app.cpp
index 20917ae..23d3a2c 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -567,10 +567,12 @@ void App::api_enddraw(char const *appid, char const *drawing_name) {
for (unsigned i = 0, iend = this->pending_end_draw.size(); i < iend; i++) {
auto n = this->lookup_name(this->pending_end_draw[i]);
+ int surface_id = this->pending_end_draw[i];
+
if (n && *n == role) {
std::swap(this->pending_end_draw[i], this->pending_end_draw[iend - 1]);
this->pending_end_draw.resize(iend - 1);
- this->activate(this->pending_end_draw[i]);
+ this->activate(surface_id);
this->emit_flushdraw(drawing_name);
this->emitScreenUpdated(appid);
}