From 4f76b8075e8a6acd8fbaad8693ba456a0dcfc836 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 25 Jun 2009 17:13:21 +0200 Subject: python/tag.cc: Return False for non-strings in 'TagSection.__contains__()'. --- python/tag.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python/tag.cc') diff --git a/python/tag.cc b/python/tag.cc index 4fcdf067..1ad0a465 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -191,6 +191,8 @@ static PyObject *TagSecExists(PyObject *Self,PyObject *Args) static int TagSecContains(PyObject *Self,PyObject *Arg) { + if (PyString_Check(Arg) == 0) + return 0; const char *Name = PyString_AsString(Arg); const char *Start; const char *Stop; -- cgit v1.2.3