projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ods-reader: Fix GCC warning.
[pspp]
/
src
/
ui
/
gui
/
find-dialog.c
diff --git
a/src/ui/gui/find-dialog.c
b/src/ui/gui/find-dialog.c
index 51645d6f62b1073614cb2b51b1ae8a3cdd695b17..8dea41768ae6fba92d39f94cd037edc8f2d8ae30 100644
(file)
--- 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.
/* 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
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 "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"
#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;
const struct string_comparator *ssc =
(const struct string_comparator *) cmptr;
+ int width;
+
const char *text = var_lookup_value_label (cmptr->var, val);
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);
assert ( cmptr->flags & STR_CMP_LABELS);