1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

[#96 state:fixed] Fixed a hard crash on calling get_blocks() with an empty path.

This commit is contained in:
Virgil Dupras
2010-07-14 09:36:35 +02:00
parent ac1593ff75
commit 56a39df635
2 changed files with 6 additions and 1 deletions

View File

@@ -158,6 +158,11 @@ static PyObject* block_osx_getblocks(PyObject *self, PyObject *args)
return NULL;
}
if (PySequence_Length(path) == 0) {
PyErr_SetString(PyExc_ValueError, "empty path");
return NULL;
}
image_path = pystring2cfstring(path);
if (image_path == NULL) {
return PyErr_NoMemory();