X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Ffind-dialog.c;h=8dea41768ae6fba92d39f94cd037edc8f2d8ae30;hb=3c2dea449f517a982d9d7d6171ab0dfe5792ffa9;hp=51645d6f62b1073614cb2b51b1ae8a3cdd695b17;hpb=66ada89a69ed73a1a15abfbd9bffe4cdf9bf307a;p=pspp diff --git a/src/ui/gui/find-dialog.c b/src/ui/gui/find-dialog.c index 51645d6f62..8dea41768a 100644 --- a/src/ui/gui/find-dialog.c +++ b/src/ui/gui/find-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2009, 2011 Free Software Foundation + Copyright (C) 2007, 2009, 2011, 2012 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,6 +23,7 @@ which match particular strings */ #include "find-dialog.h" #include "psppire-selector.h" #include "psppire-dialog.h" +#include "builder-wrapper.h" #include "helper.h" #include "psppire-data-window.h" #include "dict-display.h" @@ -470,8 +471,13 @@ string_label_compare (const struct comparator *cmptr, const struct string_comparator *ssc = (const struct string_comparator *) cmptr; + int width; + const char *text = var_lookup_value_label (cmptr->var, val); - int width = strlen (text); + if (text == NULL) + return false; + + width = strlen (text); assert ( cmptr->flags & STR_CMP_LABELS);