Merge "ui: join only if joinable."
This commit is contained in:
+3
-1
@@ -173,7 +173,9 @@ ScreenRecoveryUI::ScreenRecoveryUI(bool scrollable_menu)
|
||||
|
||||
ScreenRecoveryUI::~ScreenRecoveryUI() {
|
||||
progress_thread_stopped_ = true;
|
||||
progress_thread_.join();
|
||||
if (progress_thread_.joinable()) {
|
||||
progress_thread_.join();
|
||||
}
|
||||
}
|
||||
|
||||
GRSurface* ScreenRecoveryUI::GetCurrentFrame() const {
|
||||
|
||||
@@ -293,6 +293,11 @@ TEST_F(ScreenRecoveryUITest, Init) {
|
||||
ASSERT_FALSE(ui_->WasTextEverVisible());
|
||||
}
|
||||
|
||||
TEST_F(ScreenRecoveryUITest, dtor_NotCallingInit) {
|
||||
ui_.reset();
|
||||
ASSERT_FALSE(ui_);
|
||||
}
|
||||
|
||||
TEST_F(ScreenRecoveryUITest, ShowText) {
|
||||
ASSERT_TRUE(ui_->Init(kTestLocale));
|
||||
ASSERT_FALSE(ui_->IsTextVisible());
|
||||
|
||||
Reference in New Issue
Block a user