aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-04-01 18:30:55 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-04-01 18:30:55 +0000
commitcffdac83222aef2b7d6381a1bf4f639789b65d82 (patch)
tree432c8bb04cb1b2ddc71d1b4621d8753b555eedce /src/main.c
parent506930a4e3e09276e1cf44f25820acc2e5f7f19f (diff)
Error checking input file loading
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@23 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index c3155d0..528d508 100644
--- a/src/main.c
+++ b/src/main.c
@@ -65,17 +65,17 @@ static gint main_method_window_response(GtkWidget *method_window, gint response,
val=0;
}
- if ( ctx->inputfiletype != INPUT_CACHE ) {
+ if ( (ctx->inputfiletype != INPUT_CACHE) && !val && (ctx->reflectionctx) ) {
cache_save(ctx->filename, ctx->reflectionctx);
}
- if ( !val && (ctx->rmode == RECONSTRUCTION_PREDICTION) ) {
+ if ( !val && (ctx->rmode == RECONSTRUCTION_PREDICTION) && (ctx->reflectionctx) ) {
val = ipr_reduce(ctx);
}
//dump_histogram(ctx->reflectionctx);
- if ( val == 0 ) {
+ if ( !val && (ctx->reflectionctx) ) {
displaywindow_open(ctx);
} else {
fprintf(stderr, "Reconstruction failed.\n");