[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/extragear/kde3/utils/krecipes/src/dialogs
From:       Jason Kivlighn <jkivlighn () gmail ! com>
Date:       2007-09-10 18:10:20
Message-ID: 1189447820.535682.1383.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 710725 by jkivlighn:

Don't crash when using the ingredient parser when there's no ingredients already \
entered.

 M  +1 -1      recipeinputdialog.cpp  


--- branches/extragear/kde3/utils/krecipes/src/dialogs/recipeinputdialog.cpp \
#710724:710725 @@ -1287,7 +1287,7 @@
 	if ( dlg.exec() == QDialog::Accepted ) {
 		IngredientList ings = dlg.ingredients();
 		QStringList usedGroups;
-		bool haveHeader = ingredientList->lastItem()->rtti() == INGGRPLISTVIEWITEM_RTTI;
+		bool haveHeader = ingredientList->lastItem() && ingredientList->lastItem()->rtti() \
== INGGRPLISTVIEWITEM_RTTI;  for ( IngredientList::iterator it = ings.begin(); it != \
ings.end(); ++it ) {  if ( !(*it).group.isEmpty() && usedGroups.find((*it).group) == \
                usedGroups.end() ) {
 				int id = IngredientInputWidget::createNewGroupIfNecessary((*it).group,database);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic