Skip to content

Commit 181be6f

Browse files
committed
Fix free-ing the file path
1 parent 4bf89fa commit 181be6f

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
group = "tv.wunderbox"
8-
version = "0.1.1"
8+
version = "0.1.2"
99

1010
repositories {
1111
mavenCentral()

src/main/kotlin/tv/wunderbox/nfd/nfd/NfdFileDialog.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class NfdFileDialog : FileDialog {
125125
return FileDialog.Error.ERROR.left()
126126
} finally {
127127
nfd.NFD_FreePathN(
128-
filePath = outPathPointer,
128+
filePath = outPathPointer.value,
129129
)
130130
}
131131
outPath.let(::File)
@@ -179,7 +179,7 @@ class NfdFileDialog : FileDialog {
179179
return FileDialog.Error.ERROR.left()
180180
} finally {
181181
nfd.NFD_FreePathN(
182-
filePath = outPathPointer,
182+
filePath = outPathPointer.value,
183183
)
184184
}
185185

src/main/kotlin/tv/wunderbox/nfd/nfd/jna/NfdLibraryNativeApi.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ interface NfdLibraryNativeApi {
7575

7676
fun NFD_PathSet_Free(pathSet: Pointer)
7777

78-
fun NFD_FreePathN(filePath: PointerByReference)
78+
fun NFD_FreePathN(filePath: Pointer)
7979

8080
/**
8181
* Gets the number of entries stored in pathSet

0 commit comments

Comments
 (0)