blob: 3cac2eef6dad955a7c20eb8b4f3fb1541ff99c2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
diff --git a/widget/gtk/DMABufSurface.cpp b/widget/gtk/DMABufSurface.cpp
--- a/widget/gtk/DMABufSurface.cpp
+++ b/widget/gtk/DMABufSurface.cpp
@@ -204,17 +204,17 @@
}
void DMABufSurface::FenceDelete() {
+ if (mSyncFd > 0) {
+ close(mSyncFd);
+ mSyncFd = -1;
+ }
+
if (!mGL) {
return;
}
const auto& gle = gl::GLContextEGL::Cast(mGL);
const auto& egl = gle->mEgl;
- if (mSyncFd > 0) {
- close(mSyncFd);
- mSyncFd = -1;
- }
-
if (mSync) {
egl->fDestroySync(mSync);
mSync = nullptr;
|