Fixes NB#106346, coverity issues
pmo-trunk-r8127
reg = (EditModeRegister *) g_hash_table_lookup (priv->edit_mode_registry,
GINT_TO_POINTER (priv->edit_command));
reg = (EditModeRegister *) g_hash_table_lookup (priv->edit_mode_registry,
GINT_TO_POINTER (priv->edit_command));
- if (reg == NULL)
- modest_hildon2_window_unset_edit_mode (self);
- if ((reg->action == NULL) || reg->action (self))
+ if (reg) {
+ if ((reg->action == NULL) || reg->action (self))
+ modest_hildon2_window_unset_edit_mode (self);
+ } else {
modest_hildon2_window_unset_edit_mode (self);
modest_hildon2_window_unset_edit_mode (self);