Skip to content

Commit

Permalink
- error out if destroying a canvas object
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed Oct 23, 2024
1 parent a0b0db6 commit 8e16822
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/2d/v_2ddrawer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "renderstyle.h"
#include "dobject.h"
#include "refcounted.h"
#include "printf.h"

struct DrawParms;
struct FColormap;
Expand Down Expand Up @@ -279,6 +280,7 @@ class F2DDrawer
class FCanvas : public DObject
{
DECLARE_CLASS(FCanvas, DObject)
void OnDestroy() override { I_Error("Calling Destroy on a canvas object is not allowed."); }
public:
F2DDrawer Drawer;
FCanvasTexture* Tex = nullptr;
Expand Down

0 comments on commit 8e16822

Please sign in to comment.