On 03/08/2015 at 10:55, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R16
Platform: Windows ;
Language(s) : C++ ;
---------
Greetings !
I have created a CommandData plugin, which opens a dialog when pressed.
So i have created a class that inherits both CommandData and Dialog.
class MyPlugin : public CommandData, Dialog {
//code
}
I know they can be separated but i find no reason for not keeping them together.
Now, this plugin contains some data lets say int A and B.
I try to use this plugin as singleton, by creating a private static variable MyPlugin instance.
It also has a constructor which causes crash when called at the start of the program.
The crash is located in Dialog's constructor when trying to allocate the object.
this keyword returns 0.
I assume you cant instantiate plugin classes manually right ?
It works fine when i use public static accessor methods for plugin's data.
Thank you.