Fix segfault with pyside (emitting a signal with None causes a segfault with pyside)