OSDN Git Service
(root)
/
winmerge-jp
/
winmerge-jp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1957ec2
)
DirView.cpp: Fix crash when hitting Next File icon repeatedly
author
Takashi Sawanaka
<sdottaka@users.sourceforge.net>
Mon, 18 Jan 2021 23:46:07 +0000
(08:46 +0900)
committer
Takashi Sawanaka
<sdottaka@users.sourceforge.net>
Mon, 18 Jan 2021 23:46:07 +0000
(08:46 +0900)
Src/DirView.cpp
patch
|
blob
|
history
diff --git
a/Src/DirView.cpp
b/Src/DirView.cpp
index
f6019ee
..
419f069
100644
(file)
--- a/
Src/DirView.cpp
+++ b/
Src/DirView.cpp
@@
-2121,11
+2121,12
@@
bool CDirView::IsLastFile()
void CDirView::OpenNextFile()
{
+ const int count = m_pList->GetItemCount();
int currentInd = GetFocusedItem();
int nextInd = currentInd + 1;
if (currentInd >= 0)
{
- while (
true
)
+ while (
nextInd < count
)
{
DIFFITEM& dip = GetDiffItem(nextInd);
MoveFocus(nextInd - 1, nextInd, 1);