Commit 155fbc6b authored by Thomas Guillem's avatar Thomas Guillem

mediacodec: fix crash when reporting a hw error

parent bfb5a9cc
......@@ -761,7 +761,9 @@ AWindowHandler_sendHardwareAccelerationError(vlc_object_t *p_obj,
if (p_awh)
{
p_env = AWindowHandler_getEnv(p_awh);
p_awh = NULL;
if (!p_env)
return VLC_EGENERIC;
JNI_CALL(CallVoidMethod, sendHardwareAccelerationError);
}
else
{
......@@ -769,12 +771,11 @@ AWindowHandler_sendHardwareAccelerationError(vlc_object_t *p_obj,
if (!p_awh)
return VLC_EGENERIC;
p_env = AWindowHandler_getEnv(p_awh);
if (!p_env)
return VLC_EGENERIC;
JNI_CALL(CallVoidMethod, sendHardwareAccelerationError);
AWindowHandler_destroy(p_awh);
}
if (!p_env)
return VLC_EGENERIC;
JNI_CALL(CallVoidMethod, sendHardwareAccelerationError);
if (p_awh)
AWindowHandler_destroy(p_awh);
return VLC_SUCCESS;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment