projects
/
platform
/
upstream
/
libsolv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b524d2b
)
Do not segfault when undef/None/nil is passwd as FILE/Dep
author
Michael Schroeder
<mls@suse.de>
Wed, 24 Apr 2013 10:19:49 +0000
(12:19 +0200)
committer
Michael Schroeder
<mls@suse.de>
Wed, 24 Apr 2013 10:19:49 +0000
(12:19 +0200)
bindings/solv.i
patch
|
blob
|
history
diff --git
a/bindings/solv.i
b/bindings/solv.i
index
d4e1c97
..
e48fc90
100644
(file)
--- a/
bindings/solv.i
+++ b/
bindings/solv.i
@@
-346,7
+346,7
@@
SWIG_AsValSolvFpPtr(void *obj, FILE **val) {
if (!desc) desc = SWIG_TypeQuery("SolvFp *");
if ((SWIG_ConvertPtr(obj, &vptr, desc, 0)) == SWIG_OK) {
if (val)
- *val =
((SolvFp *)vptr)->fp
;
+ *val =
vptr ? ((SolvFp *)vptr)->fp : 0
;
return SWIG_OK;
}
#ifdef SWIGPYTHON
@@
-377,7
+377,7
@@
SWIG_AsValDepId(void *obj, int *val) {
return ecode;
if ((SWIG_ConvertPtr(obj, &vptr, desc, 0)) == SWIG_OK) {
if (val)
- *val =
((Dep *)vptr)->id
;
+ *val =
vptr ? ((Dep *)vptr)->id : 0
;
return SWIG_OK;
}
return SWIG_TypeError;