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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user