Revision: 3673
http://svn.sourceforge.net/winmerge/?rev=3673&view=rev
Author: galh
Date: 2006-10-02 06:48:41 -0700 (Mon, 02 Oct 2006)
Log Message:
-----------
BUG: [ 1566783 ] Crash on Save Project when no file is selected
Modified Paths:
--------------
trunk/Src/Changes.txt
trunk/Src/MainFrm.cpp
Modified: trunk/Src/Changes.txt
===================================================================
--- trunk/Src/Changes.txt 2006-10-02 11:11:23 UTC (rev 3672)
+++ trunk/Src/Changes.txt 2006-10-02 13:48:41 UTC (rev 3673)
@@ -2,6 +2,10 @@
Add new items to top.
(This summarizes all changes to all files under Src, including Src\Languages.)
+2006-10-02 Gal
+ BUG: [ 1566783 ] Crash on Save Project when no file is selected
+ Src: MainFrm.cpp
+
2006-10-01 Kimmo
PATCH: [ 1567874 ] Change manual URL to point to 2.6 manual
Src: MainFrm.cpp
Modified: trunk/Src/MainFrm.cpp
===================================================================
--- trunk/Src/MainFrm.cpp 2006-10-02 11:11:23 UTC (rev 3672)
+++ trunk/Src/MainFrm.cpp 2006-10-02 13:48:41 UTC (rev 3673)
@@ -3060,7 +3060,8 @@
{
CDirDoc * pDoc = (CDirDoc*)pFrame->GetActiveDocument();
CDirView *pView = pDoc->GetMainView();
- int ind = pView->GetFirstSelectedInd();
+ // Use first item if no item is selected.
+ int ind = max(pView->GetFirstSelectedInd(), 0);
const DIFFITEM item = pView->GetItemAt(ind);
left = item.getLeftFilepath(pDoc->GetLeftBasePath());
left += "\\";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|