Haiku Depot: Fix text document ref crash

In +9146, I added a 'Search all packages' helper message to the Haiku
Depot featured packages view using a TextDocumentView; seems I used the
TextDocumentRef incorrectly, causing a crash on exit; this fixes that.

Change-Id: Idc08fb58dee13b6e85663097876a80a190941f57
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9242
Reviewed-by: Andrew Lindesay <[email protected]>
This commit is contained in:
PawanYr
2025-05-04 05:16:23 +00:00
committed by Andrew Lindesay
parent 8d5b39d2a6
commit 0cb1b20a1f
@@ -1109,7 +1109,7 @@ void
FeaturedPackagesView::_BuildNoResultsView()
{
fNoResultsView = new TextDocumentView();
TextDocumentRef noResultsTextDocument = new TextDocument();
TextDocumentRef noResultsTextDocument(new(std::nothrow) TextDocument(), true);
ParagraphStyle paragraphStyle;
paragraphStyle.SetAlignment(ALIGN_CENTER);
Paragraph paragraph(paragraphStyle);