From bde96640acdd49473b1cd55f252302ef8bb15b66 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Sun, 14 May 2023 20:24:54 +0200 Subject: [PATCH] Spreadsheet: Don't release the file buffer when importing CSV files CSVImportDialogPage takes and holds a StringView meaning that the data was dropped instantly and displayed garbage instead. --- Userland/Applications/Spreadsheet/ImportDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/Spreadsheet/ImportDialog.cpp b/Userland/Applications/Spreadsheet/ImportDialog.cpp index 849206fcc6..8cb8a6bd39 100644 --- a/Userland/Applications/Spreadsheet/ImportDialog.cpp +++ b/Userland/Applications/Spreadsheet/ImportDialog.cpp @@ -186,7 +186,7 @@ ErrorOr>, DeprecatedString> ImportDialog::make_and_r auto contents_or_error = file.read_until_eof(); if (contents_or_error.is_error()) return DeprecatedString::formatted("{}", contents_or_error.release_error()); - CSVImportDialogPage page { contents_or_error.release_value() }; + CSVImportDialogPage page { contents_or_error.value() }; wizard->replace_page(page.page()); auto result = wizard->exec();