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-20 12:42:21 +0900
commitb88b923f24dd0903d393240cd63aa3ef4efde59c (patch)
treea569876e6905b18666de148c7819519e3fc5d92a /src
parentb0063351853db6c861f035ee9a147a0a7f5b58e1 (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 c611501..7d2f121 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -620,10 +620,12 @@ void App::api_enddraw(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);
}
}