CSCLResourceCache *cache = CSCLResourceCache::get_instance();
CSCLActionState *state = CSCLActionState::get_instance();
CSCLWindows *windows = CSCLWindows::get_instance();
- CSCLEvents *events = CSCLEvents::get_instance();
CSCLUtils *utils = CSCLUtils::get_instance();
SclResParserManager *sclres_manager = SclResParserManager::get_instance();
PSclLayoutKeyCoordinatePointerTable sclres_layout_key_coordinate_pointer_frame =
sclres_manager->get_key_coordinate_pointer_frame();
+ if (sclres_layout_key_coordinate_pointer_frame == NULL) {
+ return FALSE;
+ }
if (scl_check_arrindex(layout, MAX_SCL_LAYOUT)) {
for (sclint loop = 0;loop < MAX_KEY; loop++) {
if ((!(mPrivateKeyProperties[id].custom_id.empty())) && mCurBaseLayoutKeyCoordination[loop].custom_id) {
if (mPrivateKeyProperties[id].custom_id.compare(mCurBaseLayoutKeyCoordination[loop].custom_id) == 0) {
- memcpy((SclLayoutKeyCoordinatePointer)(&mCurBaseLayoutKeyCoordination) + loop,
- sclres_layout_key_coordinate_pointer_frame[layout][loop], sizeof(SclLayoutKeyCoordinate));
+ SclLayoutKeyCoordinatePointer p = sclres_layout_key_coordinate_pointer_frame[layout][loop];
+ if (p == NULL) {
+ continue;
+ }
+ SclLayoutKeyCoordinatePointer the_key = mCurBaseLayoutKeyCoordination + loop;
+ assert(the_key != NULL);
+ memcpy(the_key, p, sizeof(SclLayoutKeyCoordinate));
}
}
sclres_manager->get_key_coordinate_pointer_frame();
const PSclModifierDecoration sclres_modifier_decoration = sclres_manager->get_modifier_decoration_table();
const PSclLabelPropertiesTable sclres_label_properties = sclres_manager->get_label_properties_frame();
- const PSclDefaultConfigure default_configure = sclres_manager->get_default_configure();
assert(sclres_input_mode_configure != NULL);
assert(sclres_layout != NULL);
assert(sclres_layout_key_coordinate_pointer_frame != NULL);
const PSclInputModeConfigure sclres_input_mode_configure = sclres_manager->get_input_mode_configure_table();
const PSclLayout sclres_layout = sclres_manager->get_layout_table();
sclint inputmode = sclres_manager->get_inputmode_id(input_mode);
- sclint layout = sclres_manager->get_layout_id(
- sclres_input_mode_configure[inputmode].layouts[display_mode]);
+ if (sclres_input_mode_configure && sclres_layout) {
+ sclint layout = sclres_manager->get_layout_id(
+ sclres_input_mode_configure[inputmode].layouts[display_mode]);
- ret.width = sclres_layout[layout].width;
- ret.height = sclres_layout[layout].height;
+ ret.width = sclres_layout[layout].width;
+ ret.height = sclres_layout[layout].height;
+ }
}
}