Skip to content
Snippets Groups Projects
Commit 97ba8812 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

forgot fclose
parent 2d7ab063
No related branches found
No related tags found
No related merge requests found
// $Id: Callbacks.cpp,v 1.187 2003-11-23 03:24:43 geuzaine Exp $ // $Id: Callbacks.cpp,v 1.188 2003-11-23 03:38:20 geuzaine Exp $
// //
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
// //
...@@ -2713,11 +2713,14 @@ void view_reload_cb(CALLBACK_ARGS) ...@@ -2713,11 +2713,14 @@ void view_reload_cb(CALLBACK_ARGS)
Post_View *v = (Post_View *) List_Pointer(CTX.post.list, (long int)data); Post_View *v = (Post_View *) List_Pointer(CTX.post.list, (long int)data);
strcpy(filename, v->FileName); strcpy(filename, v->FileName);
FILE *fp; // Hum... We should use the appropriate function to test this, but I
if(!(fp = fopen(filename, "r"))){ // don't know it (stat?)
FILE *fp = fopen(filename, "r");
if(!fp){
Msg(GERROR, "Unable to open file '%s'", filename); Msg(GERROR, "Unable to open file '%s'", filename);
return; return;
} }
fclose(fp);
CopyViewOptions(v, &tmp); CopyViewOptions(v, &tmp);
FreeView(v); FreeView(v);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment