[uim-commit] r2701 - branches/1.0/xim

ekato at freedesktop.org ekato at freedesktop.org
Sat Dec 24 22:40:18 PST 2005


Author: ekato
Date: 2005-12-24 22:39:29 -0800 (Sat, 24 Dec 2005)
New Revision: 2701

Modified:
   branches/1.0/xim/main.cpp
Log:
* xim/main.cpp : Port r2700 from trunk.


Modified: branches/1.0/xim/main.cpp
===================================================================
--- branches/1.0/xim/main.cpp	2005-12-25 06:38:07 UTC (rev 2700)
+++ branches/1.0/xim/main.cpp	2005-12-25 06:39:29 UTC (rev 2701)
@@ -172,7 +172,13 @@
 		it->second.fn(fd, READ_OK);
 	    if (FD_ISSET(fd, &wfds))
 		it->second.fn(fd, WRITE_OK);
+	    // fd_watch_stat may be modified by above functions at
+	    // this point.  Since the behavior with incrementing
+	    // invalidated iterator is compiler dependent, use safer
+	    // way.
 	    it = fd_watch_stat.find(fd);
+	    if (it == fd_watch_stat.end())	// shouldn't happen
+		break;
 	    it++;
 	}
     }



More information about the uim-commit mailing list