Prevented crash when clicking 'Open' or 'Erase' button in Open dialog after
clicking an empty file slot. (SourceForge Bug #1787005) [Thanks to Tomasz Gloc for reporting and investigating this one.]
This commit is contained in:
parent
29a8206965
commit
c1c2bb91dc
2 changed files with 12 additions and 3 deletions
|
|
@ -22,7 +22,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - August 9, 2007
|
||||
June 14, 2002 - September 25, 2007
|
||||
$Id$
|
||||
*/
|
||||
|
||||
|
|
@ -13211,6 +13211,8 @@ int do_open(void)
|
|||
{
|
||||
/* Picked an icon! */
|
||||
|
||||
int old_which = which;
|
||||
|
||||
which = ((event.button.x - 96) / (THUMB_W) +
|
||||
(((event.button.y - 24) / THUMB_H) * 4)) + cur;
|
||||
|
||||
|
|
@ -13233,6 +13235,8 @@ int do_open(void)
|
|||
last_click_time = SDL_GetTicks();
|
||||
last_click_button = event.button.button;
|
||||
}
|
||||
else
|
||||
which = old_which;
|
||||
}
|
||||
else if (event.button.x >= (WINDOW_WIDTH - img_scroll_up->w) / 2 &&
|
||||
event.button.x <= (WINDOW_WIDTH + img_scroll_up->w) / 2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue