mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: null ref when ResizeBuffer() call before scene is init
thanks perch
This commit is contained in:
parent
617b0ee889
commit
c22ea31ac6
1 changed files with 3 additions and 1 deletions
|
|
@ -382,11 +382,13 @@ namespace Dalamud.Interface
|
|||
|
||||
private IntPtr ResizeBuffersDetour(IntPtr swapChain, uint bufferCount, uint width, uint height, uint newFormat, uint swapChainFlags)
|
||||
{
|
||||
#if DEBUG
|
||||
Log.Verbose($"Calling resizebuffers swap@{swapChain.ToInt64():X}{bufferCount} {width} {height} {newFormat} {swapChainFlags}");
|
||||
#endif
|
||||
|
||||
// We have to ensure we're working with the main swapchain,
|
||||
// as viewports might be resizing as well
|
||||
if (swapChain != this.scene.SwapChain.NativePointer)
|
||||
if (this.scene == null || swapChain != this.scene.SwapChain.NativePointer)
|
||||
return resizeBuffersHook.Original(swapChain, bufferCount, width, height, newFormat, swapChainFlags);
|
||||
|
||||
this.scene?.OnPreResize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue