mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
Merge pull request #3609 from Nicolas0315/fix/builtin-pager-drop-panic
Fix panic in BuiltinPager Drop when pager thread fails (#3449)
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -225,8 +225,8 @@ impl Drop for OutputType {
|
|||||||
let _ = command.wait();
|
let _ = command.wait();
|
||||||
}
|
}
|
||||||
OutputType::BuiltinPager(ref mut pager) => {
|
OutputType::BuiltinPager(ref mut pager) => {
|
||||||
if pager.handle.is_some() {
|
if let Some(handle) = pager.handle.take() {
|
||||||
let _ = pager.handle.take().unwrap().join().unwrap();
|
let _ = handle.join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OutputType::Stdout(_) => (),
|
OutputType::Stdout(_) => (),
|
||||||
|
|||||||
Reference in new issue
Block a user