Skip to content

Commit

Permalink
gui保存数据添加互斥锁。
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangguanjin-dexforce committed May 11, 2023
1 parent 240e239 commit cf23224
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gui/camera_capture_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ void CameraCaptureGui::addLogMessage(QString str)

bool CameraCaptureGui::saveOneFrameData(QString path_name)
{
std::lock_guard<std::mutex> guard(mtx_save_);

if (path_name.isEmpty() || brightness_map_.empty() || depth_map_.empty() || height_map_.empty())
{
return false;
Expand Down
2 changes: 2 additions & 0 deletions gui/camera_capture_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,4 +326,6 @@ private slots:

SaveDataType save_data_type_ = SaveDataType::Origin;
bool hide_save_gui_flag_ = false;

std::mutex mtx_save_;
};

0 comments on commit cf23224

Please sign in to comment.