From 377ba2acd24dd1bc381d3c64425d5c5a43795bc7 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Mon, 7 Jul 2008 20:19:29 +0200 Subject: check track file for NULL --- src/gipfel.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(); } } -- cgit v1.2.3