Skip to content

Commit

Permalink
PerspectiveMotion: Fix crash on empty clipboard on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
arch1t3cht committed Jan 16, 2024
1 parent 1d6da84 commit 7a48e08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions DependencyControl.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@
"changelog": {
"0.1.0": [
"Initial Release"
],
"0.1.1": [
"Fix crash on empty clipboard on Windows"
]
}
},
Expand Down
4 changes: 2 additions & 2 deletions macros/arch.PerspectiveMotion.moon
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export script_name = "Aegisub Perspective-Motion"
export script_description = "Apply perspective motion tracking data"
export script_author = "arch1t3cht"
export script_namespace = "arch.PerspectiveMotion"
export script_version = "0.1.0"
export script_version = "0.1.1"

DependencyControl = require "l0.DependencyControl"
dep = DependencyControl{
Expand Down Expand Up @@ -372,7 +372,7 @@ main_dialog = (subs, sel, active) ->
selection_end_frame = Point([ aegisub.frame_from_ms(subs[si].end_time) for si in *sel ])\max!
selection_frames = selection_end_frame - selection_start_frame

clipboard_input = clipboard.get!
clipboard_input = clipboard.get() or ""
clipboard_data = parse_powerpin_data(clipboard_input)
prefilled_data = if clipboard_data != nil and #clipboard_data == selection_frames then clipboard_input else ""

Expand Down

0 comments on commit 7a48e08

Please sign in to comment.