View Issue Details

IDProjectCategoryView StatusLast Update
0017756ScribusText Frames / Story Editorpublic2026-02-21 09:04
Reporterale Assigned Toale  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Summary0017756: [PATCH] Search crashes when searching a document without (text) frames
DescriptionThe attached patch also comments out a variable that is only used in commented out code.
TagsNo tags attached.
Attached Files
search-no-frames.diff (919 bytes)   
diff --git a/scribus/ui/search.cpp b/scribus/ui/search.cpp
index 8ef000f0a..725c9e022 100644
--- a/scribus/ui/search.cpp
+++ b/scribus/ui/search.cpp
@@ -337,6 +337,10 @@ void SearchReplace::readSelectedPageItems()
 // TODO: as soon as available, use std::optional
 PageItem* SearchReplace::currentPageItem()
 {
+	if (m_pageItems.empty())
+	{
+		return nullptr;
+	}
 	return m_pageItems.at(m_currentPageItem);
 }
 
@@ -1206,7 +1210,7 @@ void SearchReplace::readPrefs()
 {
 	m_stateCollapsed = m_prefs->getBool("collapsed", false);
 
-	QRect screen = QApplication::primaryScreen()->availableGeometry();
+	// QRect screen = QApplication::primaryScreen()->availableGeometry();
 	// int left = m_prefs->getInt("left", screen.width() > width() ? (screen.width() - width()) / 2 : 0);
 	// int top = m_prefs->getInt("top", screen.height() > height() ? (screen.height() - height()) / 2 : 0);
 	// ensure that it's in the screen
search-no-frames.diff (919 bytes)   
PatchYes

Activities

Issue History

Date Modified Username Field Change
2026-02-21 09:04 ale New Issue
2026-02-21 09:04 ale File Added: search-no-frames.diff
2026-02-21 09:04 ale Assigned To => ale
2026-02-21 09:04 ale Status new => assigned
2026-02-21 09:04 ale Summary Search crashes when searching a document without (text) frames => [PATCH] Search crashes when searching a document without (text) frames