[1.0.28] Fix coverity issue (MISSING_LOCK) 45/304645/1 accepted/tizen/unified/20240131.175402
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 23 Jan 2024 00:36:03 +0000 (09:36 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Tue, 23 Jan 2024 00:36:03 +0000 (09:36 +0900)
Change-Id: Ie2e4b59d94cc7bab537861cd142d97b0d3bfe406

include/MediaTransporterDisplay.h

index 639d89b..c79b7a4 100644 (file)
@@ -41,10 +41,10 @@ public:
        mtprDisplayType getType() { return _type; };
 
        void setVisible(bool visible);
-       bool getVisible() { return _visible; };
+       bool getVisible() { std::lock_guard<std::mutex> mutex(_mutex); return _visible; };
 
        void setMode(mtprDisplayMode mode);
-       mtprDisplayMode getMode() { return _mode; };
+       mtprDisplayMode getMode() { std::lock_guard<std::mutex> mutex(_mutex); return _mode; };
 
 private:
        void applyVisibleProperty();