fix close method so if an app directly calls close(), finalize wont blow up.
This commit is contained in:
Doug MacEachern 2005-01-20 00:45:00 +00:00
parent bee745af0d
commit 00e64ab40d
1 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,9 @@ public class Pdh extends Win32Bindings {
h_counter = -1l; h_counter = -1l;
} }
pdhCloseQuery(h_query); if (h_query != -1l) {
pdhCloseQuery(h_query);
}
} }
public double getSingleValue(String cp) throws Win32Exception { public double getSingleValue(String cp) throws Win32Exception {