Bug 239863 - rekonq crashes when going back without available history (PDF View)
Summary: rekonq crashes when going back without available history (PDF View)
Status: RESOLVED FIXED
Alias: None
Product: rekonq
Classification: Applications
Component: general (show other bugs)
Version: 0.4.90
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Andrea Diamantini
URL:
Keywords:
Depends on:
Blocks: 237890
  Show dependency treegraph
 
Reported: 2010-05-28 14:45 UTC by Fabian Köster
Modified: 2010-09-04 10:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Köster 2010-05-28 14:45:15 UTC
Version:           0.4.90 (using KDE 4.4.3) 
OS:                Linux

rekonq crashes when opening a PDF file in a new tab and then going back in history.

Reproducible: Always

Steps to Reproduce:
1.) Open Website http://www.informatik.uni-bonn.de/de/fuer-studenten/diplomstudiengang-informatik/bestimmungen/

2.) Open one of the PDF-files on this page IN A NEW TAB!

3.) Switch to the tab opened in 2.)

4.) Hit the 'Back'-Button

Actual Results:  
rekonq crashes

Expected Results:  
1.) rekonq should not crash, never! ;)

2.) The 'Back'-Button should not be available when there is no history available for the current tab
Comment 1 Fabian Köster 2010-05-28 14:47:21 UTC
Application: rekonq (0.4.90)
KDE Platform Version: 4.4.3 (KDE 4.4.3)
Qt Version: 4.6.2
Operating System: Linux 2.6.32-gentoo-r7 i686
Comment 2 Panagiotis Papadopoulos 2010-05-28 16:38:56 UTC
I can confirm this
Comment 3 Andrea Diamantini 2010-06-01 11:35:00 UTC
commit 8f60881dcf4d27fc6faf80a1a3a213c1466492ee
Author: Andrea Diamantini <adjam7@gmail.com>
Date:   Tue Jun 1 11:36:26 2010 +0200

    No history back action enabled when history is empty
    
    BUG:239863

diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index dc29d2e..7133f09 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -659,7 +659,7 @@ void MainWindow::updateActions()
     bool rekonqPage = currentTab()->page()->isOnRekonqPage();
     
     QAction *historyBackAction = actionByName(KStandardAction::name(KStandardAction::Back));
-    if( rekonqPage )
+    if( rekonqPage && currentTab()->view()->history()->count() > 0 )
         historyBackAction->setEnabled(true);
     else
         historyBackAction->setEnabled(currentTab()->view()->history()->canGoBack());