summaryrefslogtreecommitdiffhomepage
path: root/StarsEx
diff options
context:
space:
mode:
Diffstat (limited to 'StarsEx')
-rw-r--r--StarsEx/D3DXImage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/StarsEx/D3DXImage.cpp b/StarsEx/D3DXImage.cpp
index 21b1fae..5145ac5 100644
--- a/StarsEx/D3DXImage.cpp
+++ b/StarsEx/D3DXImage.cpp
@@ -11,7 +11,6 @@
D3DX image file loader
*/
-
#include "D3DXImage.h"
#include "VideoDX9.h"
@@ -66,7 +65,6 @@ bool D3DXImage::Load(char *filename)
if (buf) {
fread(buf, len, 1, f);
fclose(f);
-
success = LoadBuffer(buf, len);
}
@@ -100,6 +98,8 @@ bool D3DXImage::LoadBuffer(BYTE* buf, int len)
IDirect3DSurface9* surf = 0;
IDirect3DDevice9* dev = VideoDX9::GetD3DDevice9();
+ if (dev == nullptr)
+ return success;
hr = dev->CreateOffscreenPlainSurface( width,