[uim-commit] r2560 - trunk/xim
ekato at freedesktop.org
ekato at freedesktop.org
Mon Dec 12 20:46:30 PST 2005
Author: ekato
Date: 2005-12-12 20:46:26 -0800 (Mon, 12 Dec 2005)
New Revision: 2560
Modified:
trunk/xim/ximserver.cpp
Log:
* xim/ximserver.cpp (InputContext::createUimContext) : Add sanity
check for the return value of uim_create_context().
Modified: trunk/xim/ximserver.cpp
===================================================================
--- trunk/xim/ximserver.cpp 2005-12-13 03:35:31 UTC (rev 2559)
+++ trunk/xim/ximserver.cpp 2005-12-13 04:46:26 UTC (rev 2560)
@@ -394,24 +394,26 @@
NULL, real_im, uim_iconv,
InputContext::commit_cb);
- uim_set_preedit_cb(uc,
- InputContext::clear_cb,
- InputContext::pushback_cb,
- InputContext::update_cb);
- uim_set_candidate_selector_cb(uc,
- InputContext::candidate_activate_cb,
- InputContext::candidate_select_cb,
- InputContext::candidate_shift_page_cb,
- InputContext::candidate_deactivate_cb);
- uim_set_prop_list_update_cb(uc,
- InputContext::update_prop_list_cb);
- uim_set_prop_label_update_cb(uc,
- InputContext::update_prop_label_cb);
- uim_set_configuration_changed_cb(uc, InputContext::configuration_changed_cb);
+ if (uc) {
+ uim_set_preedit_cb(uc,
+ InputContext::clear_cb,
+ InputContext::pushback_cb,
+ InputContext::update_cb);
+ uim_set_candidate_selector_cb(uc,
+ InputContext::candidate_activate_cb,
+ InputContext::candidate_select_cb,
+ InputContext::candidate_shift_page_cb,
+ InputContext::candidate_deactivate_cb);
+ uim_set_prop_list_update_cb(uc,
+ InputContext::update_prop_list_cb);
+ uim_set_prop_label_update_cb(uc,
+ InputContext::update_prop_label_cb);
+ uim_set_configuration_changed_cb(uc,
+ InputContext::configuration_changed_cb);
- if (mFocusedContext == this)
- uim_prop_list_update(uc);
-
+ if (mFocusedContext == this)
+ uim_prop_list_update(uc);
+ }
mUc = uc;
}
More information about the uim-commit
mailing list