Index: NoesisRenderDevice.cpp
===================================================================
--- NoesisRenderDevice.cpp	(revision 13468)
+++ NoesisRenderDevice.cpp	(working copy)
@@ -102,7 +102,7 @@
 	}
 	// End of Texture interface
 
-	FTexture2DRHIRef ShaderResourceTexture;
+	FTextureRHIRef ShaderResourceTexture;
 	uint32 Width;
 	uint32 Height;
 	uint32 NumMipMaps;
@@ -1640,35 +1640,22 @@
 	{
 		UTexture2D* Texture2D = (UTexture2D*)InTexture;
 		Texture = *new FNoesisTexture(Texture2D);
-		FTexture2DResource* Resource = (FTexture2DResource*)TextureResource;
-		// Usually the RHI resource is ready when we create the texture.
-		// However, when we are hot-reloading a texture, UE4 enqueues the
-		// creation to the render thread, so we must do the same.
-		FTexture2DRHIRef TextureRef = Resource->GetTexture2DRHI();
-		if (TextureRef)
-		{
-			check(Texture->Width >= TextureRef->GetSizeX());
-			check(Texture->Height >= TextureRef->GetSizeY());
-			check(Texture->NumMipMaps >= TextureRef->GetNumMips());
-			Texture->ShaderResourceTexture = TextureRef;
-		}
-		else
-		{
-			ENQUEUE_RENDER_COMMAND(FNoesisInstance_InitRenderer)
-			(
-				[Texture, Resource](FRHICommandListImmediate&)
+
+		auto& TextureReference = InTexture->TextureReference;
+		ENQUEUE_RENDER_COMMAND(FNoesisInstance_InitRenderer)
+		(
+			[Texture, &TextureReference](FRHICommandListImmediate&)
+			{
+				FTextureRHIRef TextureRef = TextureReference.TextureReferenceRHI.GetReference();
+				if (TextureRef.IsValid() && TextureRef->IsValid())
 				{
-					FTexture2DRHIRef TextureRef = Resource->GetTexture2DRHI();
-					if (TextureRef)
-					{
-						check(Texture->Width >= TextureRef->GetSizeX());
-						check(Texture->Height >= TextureRef->GetSizeY());
-						check(Texture->NumMipMaps >= TextureRef->GetNumMips());
-						Texture->ShaderResourceTexture = TextureRef;
-					}
+					check(Texture->Width >= TextureRef->GetSizeX());
+					check(Texture->Height >= TextureRef->GetSizeY());
+					check(Texture->NumMipMaps >= TextureRef->GetNumMips());
+					Texture->ShaderResourceTexture = TextureRef;
 				}
-			);
-		}
+			}
+		);
 	}
 	else if (InTexture->IsA<UTextureRenderTarget2D>())
 	{
 
