Skip to content

Commit

Permalink
Merge pull request #20 from stream-labs/fix-memory-leak
Browse files Browse the repository at this point in the history
Fix memory leak in the display
  • Loading branch information
eddyStreamlabs authored Jan 25, 2018
2 parents 1ac3dde + fe0d7ca commit 99ad771
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nodeobs_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static void DrawGlyph(GS::VertexBuffer* vb, float_t x, float_t y, float_t scale,
break;
}

GS::Vertex v;
GS::Vertex v(nullptr, nullptr, nullptr, nullptr, nullptr);
size_t bs = vb->Size();
vb->Resize(bs + 6);

Expand Down Expand Up @@ -366,7 +366,7 @@ static void DrawGlyph(GS::VertexBuffer* vb, float_t x, float_t y, float_t scale,
}

inline void DrawBox(float_t x, float_t y, float_t w, float_t h, float_t depth, uint32_t color, GS::VertexBuffer* vbh) {
GS::Vertex v;
GS::Vertex v(nullptr, nullptr, nullptr, nullptr, nullptr);
size_t bs = vbh->Size();
vbh->Resize(bs + 6);

Expand Down Expand Up @@ -396,7 +396,7 @@ inline void DrawBox(float_t x, float_t y, float_t w, float_t h, float_t depth, u
}

inline void DrawBoxOutline(float_t x, float_t y, float_t w, float_t h, float_t depth, uint32_t color, GS::VertexBuffer* vbh) {
GS::Vertex v;
GS::Vertex v(nullptr, nullptr, nullptr, nullptr, nullptr);
size_t bs = vbh->Size();
vbh->Resize(bs + 8);

Expand Down

0 comments on commit 99ad771

Please sign in to comment.