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 <apl@lindesay.co.nz>
Diff
src/apps/haikudepot/ui/FeaturedPackagesView.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -1109,7 +1109,7 @@
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);