From 18c17484bcb140a3f549add10700f83f843fa7e7 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 9 Mar 2017 13:44:22 +0100 Subject: [printergui] Removed NULL checks that can never yield true --- src/maingui/printergui.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/maingui/printergui.cpp b/src/maingui/printergui.cpp index 528400e..8d094e3 100644 --- a/src/maingui/printergui.cpp +++ b/src/maingui/printergui.cpp @@ -233,14 +233,8 @@ static void enableOptionSelection(ppd_file_t *ppd, QStringList &nameList, QCombo combo->setUpdatesEnabled(false); combo->clear(); for (int i = 0; i < o->num_choices; ++i) { - if (o->choices[i].choice == NULL) - continue; - if (o->choices[i].text == NULL) { - combo->addItem(QString::fromUtf8(o->choices[i].choice), QString::fromLatin1(o->choices[i].choice)); - } else { - combo->addItem(QString::fromUtf8(o->choices[i].text), QString::fromLatin1(o->choices[i].choice)); - } - if (o->defchoice != NULL && strcmp(o->choices[i].choice, o->defchoice) == 0) { + combo->addItem(QString::fromUtf8(o->choices[i].text), QString::fromLatin1(o->choices[i].choice)); + if (strcmp(o->choices[i].choice, o->defchoice) == 0) { combo->setCurrentIndex(i); } } -- cgit v1.2.3-55-g7522