summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stem/util/system.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/stem/util/system.py b/stem/util/system.py
index c35e22f..46aead2 100644
--- a/stem/util/system.py
+++ b/stem/util/system.py
@@ -722,7 +722,15 @@ def get_process_name():
args, argc = [], argc_t()
for i in xrange(100):
- if argc[i] is None:
+ # The ending index can be either None or raise a ValueError when
+ # accessed...
+ #
+ # ValueError: NULL pointer access
+
+ try:
+ if argc[i] is None:
+ break
+ except ValueError:
break
args.append(str(argc[i]))