Bug 129890

Summary: gwenview segfaults when trying to open folder properties
Product: [Applications] gwenview Reporter: Elvis Pranskevichus <elprans>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Crash report

Description Elvis Pranskevichus 2006-06-27 06:17:57 UTC
Version:           1.3.91 (using KDE KDE 3.5.3)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.1.1 (Gentoo 4.1.1) Compiled with -O2 -march=pentium4 -pipe -fomit-frame-pointer -fno-ident -momit-leaf-frame-pointer, kdehiddenvisibility and kdeenablefinal
OS:                Linux

To reproduce:
1. Go to any folder with images.
2. Right click on empty space to call folder context menu.
3. Choose 'Properties'.
4. Segfault
Comment 1 Konrad Urlichs 2006-09-20 18:48:52 UTC
Hi,
I use 1.3.92 (KDE 3.5.4). I can confirm this crash.
Attached the crash report.
Comment 2 Konrad Urlichs 2006-09-20 18:49:21 UTC
Created attachment 17853 [details]
Crash report
Comment 3 Aurelien Gateau 2006-10-09 00:33:28 UTC
SVN commit 593752 by gateau:

Fix crash when showing current folder properties from context menu

BUG: 129890


 M  +5 -0      NEWS  
 M  +5 -1      app/mainwindow.cpp  


--- trunk/extragear/graphics/gwenview/NEWS #593751:593752
@@ -1,3 +1,8 @@
+2006.xx.xx - v1.4.1
+- Fixes:
+ - Fix crash when showing current folder properties from context menu (Bug
+   129890)
+
 2006.09.16 - v1.4.0
 - Fixes:
  - In a slideshow, let videos play to the end before showing next image/video.
--- trunk/extragear/graphics/gwenview/app/mainwindow.cpp #593751:593752
@@ -402,7 +402,11 @@
 void MainWindow::showFileProperties() {
 	if (mFileViewController->isVisible()) {
 		const KFileItemList* list = mFileViewController->currentFileView()->selectedItems();
-		(void)new KPropertiesDialog(*list, this);
+		if (list->count() > 0) {
+			(void)new KPropertiesDialog(*list, this);
+		} else {
+			(void)new KPropertiesDialog(mFileViewController->dirURL(), this);
+		}
 	} else {
 		(void)new KPropertiesDialog(mDocument->url(), this);
 	}