summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Handle.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc
index 47be433..f8db7c3 100644
--- a/lib/Handle.cc
+++ b/lib/Handle.cc
@@ -204,11 +204,10 @@ void Handle::SetZ(int az) throw (GeneralException) {
if (z) {
throw GeneralException(_("Can't SetZ a Handle twice."));
}
- z = az;
if (h < 0) {
throw GeneralException(_("Can't SetZ a virtual Handle."));
}
- if (z) {
+ if (az) {
char format[4];
int index = 0;
if (CanRead()) {
@@ -223,6 +222,7 @@ void Handle::SetZ(int az) throw (GeneralException) {
if (!(zfile = gzdopen(h, format))) {
throw GeneralException(_("Was not able to gzdopen."));
}
+ z = az;
}
}