summaryrefslogtreecommitdiff
path: root/src/gipfel.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-07-07 20:19:29 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-07-07 20:19:29 +0200
commit377ba2acd24dd1bc381d3c64425d5c5a43795bc7 (patch)
tree3a279bdcd5070c1965a229a091920695f753da37 /src/gipfel.cxx
parent6e11247dd02d25ce4817aed0fd90ec286a0ad669 (diff)
check track file for NULL
Diffstat (limited to 'src/gipfel.cxx')
-rw-r--r--src/gipfel.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gipfel.cxx b/src/gipfel.cxx
index df75f05..9a48ade 100644
--- a/src/gipfel.cxx
+++ b/src/gipfel.cxx
@@ -96,7 +96,7 @@ void quit_cb() {
void open_cb() {
char *file = fl_file_chooser("Open File?", "*.jpg", img_file);
- if(file != NULL) {
+ if (file) {
gipf->load_image(file);
scroll->position(0, 0);
view_win->label(file);
@@ -108,7 +108,7 @@ void open_cb() {
void track_cb() {
char *file = fl_file_chooser("Track File?", NULL, NULL);
- if (gipf->load_track(file) == 0) {
+ if (file && gipf->load_track(file) == 0) {
s_track_width->activate();
}
}