~haggai-eran/nux/rtl

« back to all changes in this revision

Viewing changes to NuxGraphics/GLResourceManager.cpp

  • Committer: Haggai Eran
  • Date: 2011-10-15 21:01:00 UTC
  • mfrom: (413.1.84 nux)
  • Revision ID: haggai.eran@gmail.com-20111015210100-4amf0pdxuzkynotw
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
  ResourceData::~ResourceData ()
48
48
  {
49
 
    GetGraphicsDisplay()->GetGraphicsEngine()->FlushCachedResourceData(this);
 
49
    // If the windows thread is deleted before any texture type resource, the
 
50
    // graphics display will not exist.
 
51
    GraphicsDisplay* display = GetGraphicsDisplay();
 
52
    if (display)
 
53
      display->GetGraphicsEngine()->FlushCachedResourceData(this);
50
54
  }
51
55
 
52
56
  int ResourceData::GetResourceIndex() const
169
173
      // make sure the result is valid
170
174
      if (CachedResource.IsNull() )
171
175
      {
172
 
        nuxError (TEXT ("Cannot cache resource type %s"), Source->Type().GetName() );
 
176
        nuxError (TEXT ("Cannot cache resource type %s"), Source->Type().name );
173
177
      }
174
178
      else
175
179
      {