Skip to content

Commit 17ca2a1

Browse files
author
L'In20Cible
committed
Fixed exception into GameEvent.__getitem__.
1 parent d3152be commit 17ca2a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/modules/events/events.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class IGameEventExt: public IGameEvent
6969
}
7070
catch(...)
7171
{
72-
KeyValues *field = ((IGameEventExt *)pEvent)->m_pDescriptor->keys->FindKey(item);
72+
KeyValues *field = GetDescriptor(pEvent)->keys->FindKey(item);
7373
if (field != NULL)
7474
{
7575
switch ((EventVarType)atoi(field->GetString()))
@@ -93,8 +93,8 @@ class IGameEventExt: public IGameEvent
9393
}
9494
}
9595

96-
if (return_value.ptr() == Py_None)
97-
PyErr_Print();
96+
if (return_value.ptr() == Py_None && PyErr_Occurred())
97+
throw_error_already_set();
9898

9999
PyErr_Clear();
100100
}

0 commit comments

Comments
 (0)