[pulseaudio-commits] [Git][pulseaudio/pavucontrol][master] pavuapplication: initialize members in the constructor
Arun Raghavan
gitlab at gitlab.freedesktop.org
Sun Oct 21 09:01:26 UTC 2018
Arun Raghavan pushed to branch master at PulseAudio / pavucontrol
Commits:
d3b3bee3 by Tanu Kaskinen at 2018-10-18T12:27:10Z
pavuapplication: initialize members in the constructor
It seems that without explicit initialization of the members they remain
uninitialized. The lack of initialization caused crashing, because
PavuApplication::on_activate() creates the MainWindow only if mainWindow
is NULL, and if it's some random value instead, on_activate() calls
selectTab() on a non-existent window.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/issues/49
- - - - -
2 changed files:
- src/pavuapplication.cc
- src/pavuapplication.h
Changes:
=====================================
src/pavuapplication.cc
=====================================
@@ -30,7 +30,14 @@
#include "pavucontrol.h"
#include "mainwindow.h"
-PavuApplication::PavuApplication() : Gtk::Application("org.pulseaudio.pavucontrol", Gio::ApplicationFlags::APPLICATION_HANDLES_COMMAND_LINE) {
+PavuApplication::PavuApplication() :
+ Gtk::Application("org.pulseaudio.pavucontrol", Gio::ApplicationFlags::APPLICATION_HANDLES_COMMAND_LINE),
+ mainWindow(NULL),
+ retry(false),
+ maximize(false),
+ tab(0),
+ version(false),
+ m(NULL) {
}
/*
=====================================
src/pavuapplication.h
=====================================
@@ -45,7 +45,7 @@ private:
MainWindow* create_window();
void on_hide_window(Gtk::Window* window);
- pa_glib_mainloop *m = NULL;
+ pa_glib_mainloop *m;
};
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/commit/d3b3bee3787523df31a885febb16da582d60f1aa
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/commit/d3b3bee3787523df31a885febb16da582d60f1aa
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20181021/61c879a8/attachment-0001.html>
More information about the pulseaudio-commits
mailing list