mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-02 02:34:08 +02:00
Fix crash when clicking video overlay after a playback error
This commit is contained in:
parent
3cdc1e190a
commit
dbade7f854
@ -147,7 +147,15 @@ private void owner_FormClosing(object sender, FormClosingEventArgs e){
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void process_Exited(object sender, EventArgs e){
|
private void process_Exited(object sender, EventArgs e){
|
||||||
switch(currentProcess.ExitCode){
|
int exitCode = currentProcess.ExitCode;
|
||||||
|
|
||||||
|
currentProcess.Dispose();
|
||||||
|
currentProcess = null;
|
||||||
|
|
||||||
|
currentPipe.Dispose();
|
||||||
|
currentPipe = null;
|
||||||
|
|
||||||
|
switch(exitCode){
|
||||||
case 3: // CODE_LAUNCH_FAIL
|
case 3: // CODE_LAUNCH_FAIL
|
||||||
if (FormMessage.Error("Video Playback Error", "Error launching video player, this may be caused by missing Windows Media Player. Do you want to open the video in a browser?", FormMessage.Yes, FormMessage.No)){
|
if (FormMessage.Error("Video Playback Error", "Error launching video player, this may be caused by missing Windows Media Player. Do you want to open the video in a browser?", FormMessage.Yes, FormMessage.No)){
|
||||||
BrowserUtils.OpenExternalBrowser(lastUrl);
|
BrowserUtils.OpenExternalBrowser(lastUrl);
|
||||||
@ -162,12 +170,6 @@ private void process_Exited(object sender, EventArgs e){
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
currentProcess.Dispose();
|
|
||||||
currentProcess = null;
|
|
||||||
|
|
||||||
currentPipe.Dispose();
|
|
||||||
currentPipe = null;
|
|
||||||
|
|
||||||
owner.InvokeAsyncSafe(TriggerProcessExitEventUnsafe);
|
owner.InvokeAsyncSafe(TriggerProcessExitEventUnsafe);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user