diff options
author | Zach Reizner <zachr@google.com> | 2015-11-13 16:11:37 -0800 |
---|---|---|
committer | Zach Reizner <zachr@google.com> | 2015-11-13 16:11:37 -0800 |
commit | cb1cfc866b47c480a9fa84f6edcc5239ac99d277 (patch) | |
tree | d6e02a310e7bfdb5cb40d3ac2bc2e2a1bd707b40 /autofd.h | |
parent | 49446bc72b33b8b68352b2048657bea4a8da4a42 (diff) |
drm_hwcomposer: avoid creating release fences for invalid OutputFd
This change also adds a check for OutputFd to see if it is valid.
Change-Id: If992d523c707cc5e6e660de721938a26f27477d8
Diffstat (limited to 'autofd.h')
-rw-r--r-- | autofd.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -91,6 +91,10 @@ struct OutputFd { return *fd_; } + operator bool() const { + return fd_ != NULL; + } + private: int *fd_ = NULL; }; |