aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-08-10 20:11:16 +0200
committerMattias Andrée <maandree@operamail.com>2015-08-10 20:11:16 +0200
commit4ac55c863cb6524307303ceac1a1700c97901fad (patch)
tree554e73596d3a0ef9c32305812309ecc42cbbcec5
parentm (diff)
downloadpylibgamma-1.1.1.tar.gz
pylibgamma-1.1.1.tar.bz2
pylibgamma-1.1.1.tar.xz
fix critical bug1.1.1
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/libgamma_native_facade.pyx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libgamma_native_facade.pyx b/src/libgamma_native_facade.pyx
index 48bec73..3c342da 100644
--- a/src/libgamma_native_facade.pyx
+++ b/src/libgamma_native_facade.pyx
@@ -857,6 +857,8 @@ def libgamma_native_method_default_site(method : int) -> str:
cdef char* var
cdef bytes bs
var = libgamma_method_default_site(<int>method)
+ if var is NULL:
+ return None
bs = var
return bs.decode('utf-8', 'strict')
@@ -874,6 +876,8 @@ def libgamma_native_method_default_site_variable(method : int) -> str:
cdef const char* var
cdef bytes bs
var = libgamma_method_default_site_variable(<int>method)
+ if var is NULL:
+ return None
bs = var
return bs.decode('utf-8', 'strict')