Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix core when None is passed to some YCP functions
e.g. examples/Table1.py has Table( Header( "\u00C4nerhe\u00DF", "\u00C4\u00DF\u00F6\u00F6\u00E4\u00E4\u00E4\u00E4\u00E4" ), [ Item( Id('1'), "\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u02C7", 6 ), => Item(Id(2), "\u011B\u0161\u0159\u017E", None), Item(Id(3), "\u00C4nder\u00DF\u00DF\u00DF", 8), where the value of the TableItem is passed None, this results in the following core (gdb) where #0 YCPValueRep::isTerm() const (this=0x0) at YCPValue.cc:70 #1 0x00007ffff48c1974 in YCPTableItemParser::parseTableItem(YCPTerm const&) (itemTerm=...) at YCPTableItemParser.cc:117 #2 0x00007ffff48c13e0 in YCPTableItemParser::parseTableItemList(YCPList const&) (itemList=...) at YCPTableItemParser.cc:60 #3 0x00007ffff489ad44 in YCPDialogParser::parseTable(YWidget*, YWidgetOpt&, YCPTerm const&, YCPList const&, int) (parent=parent@entry=0x7fffe840ee30, opt=..., term=..., optList=..., argnr=0) at YCPDialogParser.cc:2604 #4 0x00007ffff48b151d in YCPDialogParser::parseWidgetTreeTerm(YWidget*, YWidgetOpt&, YCPTerm const&) (p=p@entry=0x7fffe840ee30, opt=..., term=...) at YCPDialogParser.cc:311 #5 0x00007ffff48b1c9a in YCPDialogParser::parseWidgetTreeTerm(YWidget*, YCPTerm const&) (parent=parent@entry=0x7fffe840ee30, term=...) at YCPDialogParser.cc:413 #6 0x00007ffff48b373a in YCPDialogParser::parseMinSize(YWidget*, YWidgetOpt&, YCPTerm const&, YCPList const&, int, bool, bool) (parent=parent@entry=0x7fffe831eab0, opt=..., term=..., optList=..., argnr=<optimized out>, hor=<optimized out>, vert=true) at YCPDialogParser.cc:713 so it appears the correct translation for Py_None is YCP_Void() rather than YCP_Null() Signed-off-by: Noel Power <noel.power@suse.com>
- Loading branch information