diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-03-29 17:55:32 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-03-29 17:55:32 +0200 |
commit | 072242fe2533f02c001a0e9a94bdd833506a3efe (patch) | |
tree | 561d24ccf452b0d57b089cf4b7de79d53b3ee06a /src | |
parent | e3e93b9ef2ec8451d7b6237be31ed9bcdebe9459 (diff) |
initialize tmp_fd properly (valgrind)
Diffstat (limited to 'src')
-rw-r--r-- | src/PSEditor.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/PSEditor.cxx b/src/PSEditor.cxx index a2df43f..9eeffb9 100644 --- a/src/PSEditor.cxx +++ b/src/PSEditor.cxx @@ -30,6 +30,7 @@ PSEditor::PSEditor(int X,int Y,int W, int H) : PSEditWidget(X, Y, W, H) { loaded = 0; mod = 0; ps_level = 1; + tmp_fd = -1; } @@ -111,7 +112,7 @@ int PSEditor::handle(int event) { int PSEditor::open_file(FILE *fp) { - if (tmp_fd) { + if (tmp_fd >= 0) { close(tmp_fd); } |