Revision: 6391
Author: nogu.dev
Date: Sun May 23 03:47:16 2010
Log: * qt4/immodule/candidatewindow.cpp
  - (CandidateWindow::~CandidateWindow): Check if cand is 0
    before calling uim_candidate_free() with cand.
http://code.google.com/p/uim/source/detail?r=6391

Modified:
 /trunk/qt4/immodule/candidatewindow.cpp

=======================================
--- /trunk/qt4/immodule/candidatewindow.cpp     Sun May  2 07:29:31 2010
+++ /trunk/qt4/immodule/candidatewindow.cpp     Sun May 23 03:47:16 2010
@@ -102,8 +102,11 @@
 CandidateWindow::~CandidateWindow()
 {
     // clear stored candidate data
-    while ( !stores.isEmpty() )
-        uim_candidate_free( stores.takeFirst() );
+    while ( !stores.isEmpty() ) {
+        uim_candidate cand = stores.takeFirst();
+        if ( cand )
+            uim_candidate_free( cand );
+    }
 }

 void CandidateWindow::popup()

Reply via email to