⛏️ index : haiku.git

author PawanYr <pawan.yerramilli@gmail.com> 2025-05-04 0:02:35.0 -04:00:00
committer Andrew Lindesay <apl@lindesay.co.nz> 2025-05-04 5:16:23.0 +00:00:00
commit
0cb1b20a1f63d85b2e6ebee995fdaf26d1fd5eee [patch]
tree
f80c5d710d9e916ef672468cd116a0ffacd1b389
parent
8d5b39d2a6fae6eb178da96e91c427225caba76d
download
0cb1b20a1f63d85b2e6ebee995fdaf26d1fd5eee.tar.gz

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(-)

diff --git a/src/apps/haikudepot/ui/FeaturedPackagesView.cpp b/src/apps/haikudepot/ui/FeaturedPackagesView.cpp
index d7c7a8e..68a8131 100644
--- a/src/apps/haikudepot/ui/FeaturedPackagesView.cpp
+++ b/src/apps/haikudepot/ui/FeaturedPackagesView.cpp
@@ -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);