Explorar o código

* fix crash in libvlc packages by patch from Michl, resolves #31541

git-svn-id: trunk@38308 -
florian %!s(int64=7) %!d(string=hai) anos
pai
achega
f969e43ff0
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      packages/libvlc/src/vlc.pp

+ 2 - 1
packages/libvlc/src/vlc.pp

@@ -687,7 +687,8 @@ end;
 
 
 procedure TCustomVLCMediaPlayer.SetAudioMuted(AValue: Boolean);
 procedure TCustomVLCMediaPlayer.SetAudioMuted(AValue: Boolean);
 begin
 begin
-  libvlc_audio_set_mute(instance, ord(AValue));
+  if Assigned(FInstance) then
+    libvlc_audio_set_mute(instance, ord(AValue));
 end;
 end;
 
 
 procedure TCustomVLCMediaPlayer.SetFitWindow(AValue: Boolean);
 procedure TCustomVLCMediaPlayer.SetFitWindow(AValue: Boolean);