mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04:00
bugfix
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@642 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
755a8d40eb
commit
3edf444ca1
@ -37,9 +37,14 @@ void *module_check_cast(void *object, int type_pos, const char *id)
|
||||
void *module_check_cast_module(void *object, int type_pos,
|
||||
const char *module, const char *id)
|
||||
{
|
||||
return object == NULL || strcmp(module_find_id_str(module,
|
||||
G_STRUCT_MEMBER(int, object, type_pos)), id) == 0 ?
|
||||
NULL : object;
|
||||
const char *str;
|
||||
|
||||
if (object == NULL)
|
||||
return NULL;
|
||||
|
||||
str = module_find_id_str(module,
|
||||
G_STRUCT_MEMBER(int, object, type_pos));
|
||||
return str == NULL || strcmp(str, id) != 0 ? NULL : object;
|
||||
}
|
||||
|
||||
/* return unique number across all modules for `id' */
|
||||
|
Loading…
Reference in New Issue
Block a user