View Issue Details

IDProjectCategoryView StatusLast Update
0017756ScribusText Frames / Story Editorpublic2026-04-21 20:40
Reporterale Assigned Toale  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.7.3.svn 
Fixed in Version1.7.4.svn 
Summary0017756: 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

jghali

2026-04-21 20:32

administrator   ~0053619

Oops, I wonder how we missed this one, it seems the crash itself was already fixed in some other way, but the patch still makes sense.

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
2026-02-21 11:35 ale Product Version => 1.7.3.svn
2026-04-21 20:32 jghali Status assigned => resolved
2026-04-21 20:32 jghali Resolution open => fixed
2026-04-21 20:32 jghali Fixed in Version => 1.7.4.svn
2026-04-21 20:32 jghali Note Added: 0053619
2026-04-21 20:33 jghali Summary [PATCH] Search crashes when searching a document without (text) frames => Search crashes when searching a document without (text) frames
2026-04-21 20:40 cbradney Status resolved => closed